[llvm-commits] [llvm-gcc-4.2] r57992 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Wed Oct 29 02:55:07 PDT 2008
Hi Devang,
> > PS: I debugged this directly on tramp3d-v4 rather
> > than reducing a testcase. I can try to reduce a
> > testcase if you like.
>
>
> I reduced test case in testsuite will help us avoid debugging tramp3d-
> v4 directly again in future :)
I reduced it using delta to the attached. If you apply this
patch to llvm-gcc then it will barf at the appropriate point.
Index: gcc-4.2.llvm/gcc/llvm-types.cpp
===================================================================
--- gcc-4.2.llvm.orig/gcc/llvm-types.cpp 2008-10-29 09:47:52.000000000 +0100
+++ gcc-4.2.llvm/gcc/llvm-types.cpp 2008-10-29 10:54:20.000000000 +0100
@@ -2132,6 +2132,10 @@
unsigned FieldNo =
Info->getLLVMFieldFor(FieldOffsetInBits, CurFieldNo, isZeroSizeField);
SetFieldIndex(Field, FieldNo);
+
+ assert((isBitfield(Field) || FieldNo == ~0U ||
+ FieldOffsetInBits == 8*Info->ElementOffsetInBytes[FieldNo]) &&
+ "Wrong LLVM field offset!");
}
// Put the original gcc struct back the way it was; necessary to prevent the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tramp3d-v4.cpp
Type: text/x-c++src
Size: 12661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081029/40e61008/attachment.cpp>
More information about the llvm-commits
mailing list