[llvm-commits] [llvm-gcc-4.2] r57992 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Devang Patel dpatel at apple.com
Wed Oct 29 11:14:42 PDT 2008


Hi Duncan,

On Oct 29, 2008, at 2:55 AM, Duncan Sands wrote:

> 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.

Thanks!. Did you add this in llvm tests ?
-
Devang
>
>
> 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
> <tramp3d-v4.cpp>




More information about the llvm-commits mailing list