[LLVMbugs] [Bug 12817] New: Assertion `NextFieldOffset <= RecordSize && "Size mismatch!"'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 13 22:14:45 PDT 2012


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

             Bug #: 12817
           Summary: Assertion `NextFieldOffset <= RecordSize && "Size
                    mismatch!"'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hfinkel at anl.gov
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8549
  --> http://llvm.org/bugs/attachment.cgi?id=8549
reduced test case (provided by Craig Schroeder)

Running clang trunk on:

struct s1 {long a[-6 / (8 * sizeof (long))];};struct s2 {int b;struct
s1 c;};struct s3 {struct s2 d[1];};struct s3 * e;

results in:

clang:
/src/llvm-trunk-writable/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp:868:
void<unnamed>::CGRecordLayoutBuilder::AppendTailPadding(clang::CharUnits):
Assertion `NextFieldOffset <= RecordSize && "Size mismatch!"' failed.

FWIW, gcc 4.4.3 accepts this without error or warning.

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