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

            Bug ID: 17816
           Summary: [-cxx-abi] Wrong class layout in the presence of
                    vbtables/vftables
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

-------------
struct A { int a; };
struct B { int b; };
struct C { int c; };
struct D : virtual A { int d; };
struct E : virtual B {
  virtual void foo();  // Issues a vfptr.
  int e;
};
struct F: virtual C, D, E { int f; };
F f;
---------------
As of r194076, it results in the following layout:
   0 | struct F
  12 |   struct D (base)
  12 |     (D vbtable pointer)
  16 |     int d
   0 |   struct E (primary base)
   0 |     (E vftable pointer)
   4 |     (E vbtable pointer)
   8 |     int e
  20 |   int f
  24 |   struct C (virtual base)
  24 |     int c
  28 |   struct A (virtual base)
  28 |     int a
  32 |   struct B (virtual base)
  32 |     int b

However, the nvbase E should be laid out before nvbase D.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to