[LLVMbugs] [Bug 5996] New: ARM: llvm-gcc assertion failure converting a union type

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jan 11 13:12:07 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=5996

           Summary: ARM: llvm-gcc assertion failure converting a union type
           Product: new-bugs
           Version: trunk
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bob.wilson at apple.com
                CC: llvmbugs at cs.uiuc.edu


The SingleSource/UnitTests/2006-01-23-UnionInit.c nightly test causes as
assertion failure for arm-darwin:

Assertion failed: (LLVMStructSize < GCCTypeSize && "LLVM type size doesn't
match GCC type size!"), function ConvertRECORD, file llvm-types.cpp, line 2201.

(Normally I run the nightly testsuite with a release build so this assertion
isn't checked.  Apparently the
failure is relatively harmless because the test passes.)

I looked at this briefly.  The offending type is:

struct bt1 {
  signed dv1:4;
  signed ev1:6;
  unsigned char fv1[1];
}

For the llvm type, the 2 bitfields are translated to an i16 type, since they
are too big for an i8.   That causes the alignment of the struct to increase to
16 bits, which then causes the size to be padded out to 32 bits.  This may be
fallout from my change r82630, so I'll take a look at it.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list