[LLVMbugs] [Bug 19399] New: MS ABI: Layout of class hierarchy with overridden methods and virtual inheritance is wrong
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 11 00:41:01 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19399
Bug ID: 19399
Summary: MS ABI: Layout of class hierarchy with overridden
methods and virtual inheritance is wrong
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:
extern "C" int printf(const char *, ...);
struct A {
virtual void fun() {}
};
struct B: public A {};
struct C: public virtual A {
virtual void fun() {}
C() {}
};
struct D: public virtual C, public virtual B {};
int main() {
printf("sizeof(D): %Iu\n", sizeof(D));
}
32-bit:
clang gives D size 24, msvc gives it size 20
64-bit:
clang gives D size 48, msvc gives it size 40
--
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/20140411/84b13587/attachment.html>
More information about the llvm-bugs
mailing list