[LLVMbugs] [Bug 1887] New: Error with bitfield codegen

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Dec 29 17:28:20 PST 2007


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

           Summary: Error with bitfield codegen
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


struct Test {
    int a:1;
    int e;
};

static struct Test input_files;

crashes with clang -emit-llvm with the assertion:
clang: /home/eli/llvm/tools/clang/CodeGen/CodeGenTypes.cpp:479:
void<unnamed>::RecordOrganizer::addPaddingFields(unsigned int): Assertion
`(RequiredBits % 8) == 0 && "FIXME Invalid struct layout"' failed.

I saw the bit on the mailing list about this assertion
(http://lists.cs.uiuc.edu/pipermail/cfe-dev/2007-December/000561.html), but in
this case, non-integral padding is actually necessary.

I guess this might fall into the category of "bitfields aren't implemented",
but I figured I might as well file 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