[LLVMbugs] [Bug 18692] New: MS ABI: LLVM type derived from struct has wrong size

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Feb 1 20:52:25 PST 2014


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

            Bug ID: 18692
           Summary: MS ABI: LLVM type derived from struct has wrong size
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

consider:
struct A {
  char AField[9];
};
struct B {
  long long BField1;
};
#pragma pack(push, 4)
struct __declspec(align(16)) C : A, B {};
#pragma pack(pop)
int main() { C(); }

compile with:
~/llvm/build/bin/clang++ -cc1 -triple i386-pc-win32 foo.cpp -fno-rtti
-emit-llvm-only

the following assertion fires in CGRecordLayoutBuilder.cpp:1077 :
TypeSizeInBits == getDataLayout().getTypeAllocSizeInBits(Ty) && "Type size
mismatch!"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140202/04d31506/attachment.html>


More information about the llvm-bugs mailing list