1651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
2dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// RUN:            | FileCheck %s
3651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
47967c95891c5f65f6312fbbcb999ac257d776914Warren Hunt// RUN:            | FileCheck %s -check-prefix CHECK-X64
5dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
6dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntextern "C" int printf(const char *fmt, ...);
7dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
8dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B0 { B0() { printf("B0 = %p\n", this); } };
9dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B1 { B1() { printf("B1 = %p\n", this); } };
10dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B2 { B2() { printf("B2 = %p\n", this); } };
11dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B3 { B3() { printf("B3 = %p\n", this); } };
12dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B4 { B4() { printf("B4 = %p\n", this); } };
13dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B5 { B5() { printf("B5 = %p\n", this); } };
14dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct __declspec(align(2)) B6 { B6() { printf("B6 = %p\n", this); } };
15dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct __declspec(align(16)) B7 { B7() { printf("B7 = %p\n", this); } };
16dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B8 { char c[5]; B8() { printf("B8 = %p\n", this); } };
17dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B9 { char c[6]; B9() { printf("B9 = %p\n", this); } };
18dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B10 { char c[7]; B10() { printf("B10 = %p\n", this); } };
19dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B11 { char c[8]; B11() { printf("B11 = %p\n", this); } };
20dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B0X { B0X() { printf("B0 = %p\n", this); } };
21dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B1X { B1X() { printf("B1 = %p\n", this); } };
22dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct __declspec(align(16)) B2X { B2X() { printf("B2 = %p\n", this); } };
23dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct __declspec(align(2)) B3X { B3X() { printf("B3 = %p\n", this); } };
24dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B4X { B4X() { printf("B4 = %p\n", this); } };
25dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B5X { B5X() { printf("B5 = %p\n", this); } };
26dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B6X { B6X() { printf("B6 = %p\n", this); } };
27651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesstruct B8X { short a; B8X() : a(0x000000B8) { printf("B8 = %p\n", this); } };
28dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
29dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AA : B8, B1, virtual B0 {
30dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
31651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AA() : a(0x000000AA) { printf("AA = %p\n", this); }
32dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
33dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
34dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
35651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
36651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
37651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
38651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AA
39651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B8 (base)
40651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [5] c
41651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   13 |   struct B1 (base) (empty)
42651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AA vbtable pointer)
43651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   int a
44651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   20 |   struct B0 (virtual base) (empty)
45651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=20, align=4
46651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=20, nvalign=4]
47651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
48651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
49651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
50651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
51651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AA
52651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B8 (base)
53651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [5] c
54651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   17 |   struct B1 (base) (empty)
55651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AA vbtable pointer)
56651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   20 |   int a
57651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
58651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
59651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
60dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
61dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AB : B8, B1, virtual B0 {
62dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	short a;
63651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AB() : a(0x000000AB) { printf("AB = %p\n", this); }
64dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
65dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
66dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
67651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AB
68651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B8 (base)
69651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [5] c
70651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   13 |   struct B1 (base) (empty)
71651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AB vbtable pointer)
72651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   14 |   short a
73651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
74651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
75651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
76651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
77651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AB
78651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B8 (base)
79651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [5] c
80651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   17 |   struct B1 (base) (empty)
81651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AB vbtable pointer)
82651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   18 |   short a
83651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
84651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
85651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
86dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
87dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AC : B8, B1, virtual B0 {
88dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	char a;
89651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AC() : a(0x000000AC) { printf("AC = %p\n", this); }
90dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
91dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
92dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
93651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AC
94651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B8 (base)
95651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [5] c
96651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
97651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AC vbtable pointer)
98651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   char a
99651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
100651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
101651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
102651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
103651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AC
104651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B8 (base)
105651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [5] c
106651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
107651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AC vbtable pointer)
108651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   char a
109651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
110651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
111651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
112dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
113dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AD : B8, B1, virtual B0 {
114dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	AD() { printf("AD = %p\n", this); }
115dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
116dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
117dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
118651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AD
119651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B8 (base)
120651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [5] c
121651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
122651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AD vbtable pointer)
123651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B0 (virtual base) (empty)
124651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=12, align=4
125651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=12, nvalign=4]
126651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
127651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AD
128651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B8 (base)
129651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [5] c
130651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
131651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AD vbtable pointer)
132651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B0 (virtual base) (empty)
133651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=16, align=8
134651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=16, nvalign=8]
135dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
136dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AA1 : B9, B1, virtual B0 {
137dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
138651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AA1() : a(0x00000AA1) { printf("AA1 = %p\n", this); }
139dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
140dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
141dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
142651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
143651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AA1
144651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B9 (base)
145651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [6] c
146651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   14 |   struct B1 (base) (empty)
147651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AA1 vbtable pointer)
148651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   int a
149651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   20 |   struct B0 (virtual base) (empty)
150651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=20, align=4
151651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=20, nvalign=4]
152651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
153651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
154651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AA1
155651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B9 (base)
156651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [6] c
157651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   18 |   struct B1 (base) (empty)
158651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AA1 vbtable pointer)
159651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   20 |   int a
160651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
161651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
162651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
163dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
164dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AB1 : B9, B1, virtual B0 {
165dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	short a;
166651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AB1() : a(0x00000AB1) { printf("AB1 = %p\n", this); }
167dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
168dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
169dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
170651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AB1
171651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B9 (base)
172651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [6] c
173651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
174651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AB1 vbtable pointer)
175651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   short a
176651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
177651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
178651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
179651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
180651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AB1
181651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B9 (base)
182651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [6] c
183651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
184651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AB1 vbtable pointer)
185651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   short a
186651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
187651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
188651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
189dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
190dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AC1 : B9, B1, virtual B0 {
191dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	char a;
192651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AC1() : a(0x000000C1) { printf("AC1 = %p\n", this); }
193dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
194dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
195dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
196651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AC1
197651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B9 (base)
198651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [6] c
199651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
200651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AC1 vbtable pointer)
201651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   char a
202651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
203651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
204651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
205651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
206651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AC1
207651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B9 (base)
208651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [6] c
209651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
210651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AC1 vbtable pointer)
211651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   char a
212651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
213651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
214651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
215dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
216dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AD1 : B9, B1, virtual B0 {
217dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	AD1() { printf("AD1 = %p\n", this); }
218dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
219dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
220dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
221651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AD1
222651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B9 (base)
223651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [6] c
224651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
225651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AD1 vbtable pointer)
226651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B0 (virtual base) (empty)
227651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=12, align=4
228651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=12, nvalign=4]
229651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
230651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AD1
231651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B9 (base)
232651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [6] c
233651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
234651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AD1 vbtable pointer)
235651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B0 (virtual base) (empty)
236651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=16, align=8
237651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=16, nvalign=8]
238dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
239dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AA2 : B10, B1, virtual B0 {
240dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
241651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AA2() : a(0x00000AA2) { printf("AA2 = %p\n", this); }
242dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
243dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
244dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
245651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
246651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AA2
247651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B10 (base)
248651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [7] c
249651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   15 |   struct B1 (base) (empty)
250651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AA2 vbtable pointer)
251651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   int a
252651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   20 |   struct B0 (virtual base) (empty)
253651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=20, align=4
254651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=20, nvalign=4]
255651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
256651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
257651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AA2
258651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B10 (base)
259651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [7] c
260651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   19 |   struct B1 (base) (empty)
261651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AA2 vbtable pointer)
262651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   20 |   int a
263651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
264651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
265651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
266dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
267dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AB2 : B10, B1, virtual B0 {
268dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	short a;
269651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AB2() : a(0x00000AB2) { printf("AB2 = %p\n", this); }
270dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
271dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
272dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
273651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AB2
274651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B10 (base)
275651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [7] c
276651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   13 |   struct B1 (base) (empty)
277651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AB2 vbtable pointer)
278651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   14 |   short a
279651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
280651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
281651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
282651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
283651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AB2
284651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B10 (base)
285651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [7] c
286651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   17 |   struct B1 (base) (empty)
287651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AB2 vbtable pointer)
288651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   18 |   short a
289651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
290651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
291651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
292dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
293dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AC2 : B10, B1, virtual B0 {
294dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	char a;
295651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AC2() : a(0x000000C2) { printf("AC2 = %p\n", this); }
296dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
297dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
298dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
299651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AC2
300651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B10 (base)
301651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [7] c
302651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
303651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AC2 vbtable pointer)
304651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   char a
305651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
306651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
307651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
308651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
309651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AC2
310651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B10 (base)
311651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [7] c
312651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
313651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AC2 vbtable pointer)
314651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   char a
315651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
316651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
317651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
318dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
319dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AD2 : B10, B1, virtual B0 {
320dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	AD2() { printf("AD2 = %p\n", this); }
321dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
322dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
323dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
324651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AD2
325651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B10 (base)
326651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [7] c
327651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
328651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AD2 vbtable pointer)
329651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B0 (virtual base) (empty)
330651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=12, align=4
331651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=12, nvalign=4]
332651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
333651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AD2
334651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B10 (base)
335651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [7] c
336651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
337651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AD2 vbtable pointer)
338651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B0 (virtual base) (empty)
339651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=16, align=8
340651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=16, nvalign=8]
341dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
342dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AA3 : B11, B1, virtual B0 {
343dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
344651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AA3() : a(0x00000AA3) { printf("AA3 = %p\n", this); }
345dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
346dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
347dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
348651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
349651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AA3
350651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B11 (base)
351651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [8] c
352651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
353651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AA3 vbtable pointer)
354651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   int a
355651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
356651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
357651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
358651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
359651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
360651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AA3
361651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B11 (base)
362651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [8] c
363651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
364651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AA3 vbtable pointer)
365651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   int a
366651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
367651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
368651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
369dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
370dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AB3 : B11, B1, virtual B0 {
371dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	short a;
372651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AB3() : a(0x00000AB3) { printf("AB3 = %p\n", this); }
373dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
374dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
375dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
376651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AB3
377651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B11 (base)
378651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [8] c
379651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
380651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AB3 vbtable pointer)
381651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   short a
382651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
383651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
384651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
385651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
386651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AB3
387651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B11 (base)
388651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [8] c
389651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
390651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AB3 vbtable pointer)
391651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   short a
392651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
393651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
394651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
395dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
396dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AC3 : B11, B1, virtual B0 {
397dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	char a;
398651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AC3() : a(0x000000C3) { printf("AC3 = %p\n", this); }
399dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
400dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
401dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
402651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AC3
403651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B11 (base)
404651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [8] c
405651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
406651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AC3 vbtable pointer)
407651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   char a
408651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
409651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
410651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
411651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
412651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AC3
413651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B11 (base)
414651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [8] c
415651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
416651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AC3 vbtable pointer)
417651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   char a
418651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
419651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
420651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
421dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
422dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AD3 : B11, B1, virtual B0 {
423dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	AD3() { printf("AD3 = %p\n", this); }
424dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
425dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
426dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
427651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AD3
428651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B11 (base)
429651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [8] c
430651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B1 (base) (empty)
431651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (AD3 vbtable pointer)
432651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B0 (virtual base) (empty)
433651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=12, align=4
434651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=12, nvalign=4]
435651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
436651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AD3
437651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B11 (base)
438651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [8] c
439651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B1 (base) (empty)
440651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (AD3 vbtable pointer)
441651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B0 (virtual base) (empty)
442651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=16, align=8
443651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=16, nvalign=8]
444dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
445dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct B : B1, B2, virtual B0 {
446dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	B() { printf("B = %p\n", this); }
447dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
448dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
449dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
450651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
451651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct B
452651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1 (base) (empty)
453651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   struct B2 (base) (empty)
454651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    4 |   (B vbtable pointer)
455651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   struct B0 (virtual base) (empty)
456651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=8, align=4
457651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=8, nvalign=4]
458651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
4597967c95891c5f65f6312fbbcb999ac257d776914Warren Hunt// CHECK-X64: *** Dumping AST Record Layout
460651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct B
461651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1 (base) (empty)
462651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B2 (base) (empty)
463651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (B vbtable pointer)
464651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B0 (virtual base) (empty)
465651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=16, align=8
466651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=16, nvalign=8]
467dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
468dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct C : B1, B2, B3, virtual B0 {
469dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	char a;
470651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	C() : a(0x0000000C) { printf("C = %p\n", this); }
471dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
472dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
473dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
474651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
475651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct C
476651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1 (base) (empty)
477651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    1 |   struct B2 (base) (empty)
478651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   struct B3 (base) (empty)
479651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    4 |   (C vbtable pointer)
480651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   char a
481651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B0 (virtual base) (empty)
482651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=12, align=4
483651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=12, nvalign=4]
484651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
485651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
486651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct C
487651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1 (base) (empty)
488651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    1 |   struct B2 (base) (empty)
489651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B3 (base) (empty)
490651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (C vbtable pointer)
491651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   char a
492651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
493651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
494651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
495dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
496dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct D : B1, B2, B3, B4, B5, virtual B0 {
497dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
498651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	D() : a(0x0000000D) { printf("D = %p\n", this); }
499dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
500dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
501dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
502651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
503651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
504651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct D
505651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1 (base) (empty)
506651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    1 |   struct B2 (base) (empty)
507651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    2 |   struct B3 (base) (empty)
508651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    3 |   struct B4 (base) (empty)
509651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   struct B5 (base) (empty)
510651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    4 |   (D vbtable pointer)
511651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   int a
512651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B0 (virtual base) (empty)
513651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=12, align=4
514651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=12, nvalign=4]
515651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
516651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
517651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
518651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct D
519651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1 (base) (empty)
520651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    1 |   struct B2 (base) (empty)
521651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    2 |   struct B3 (base) (empty)
522651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    3 |   struct B4 (base) (empty)
523651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B5 (base) (empty)
524651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (D vbtable pointer)
525651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   int a
526651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
527651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
528651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
529dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
530dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct E : B1, B6, B3, B4, B5, virtual B0 {
531dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
532651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	E() : a(0x0000000E) { printf("E = %p\n", this); }
533dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
534dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
535dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
536651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
537651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct E
538651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1 (base) (empty)
539651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    2 |   struct B6 (base) (empty)
540651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    3 |   struct B3 (base) (empty)
541651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    4 |   struct B4 (base) (empty)
542651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   13 |   struct B5 (base) (empty)
543651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (E vbtable pointer)
544651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   int a
545651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   20 |   struct B0 (virtual base) (empty)
546651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=20, align=4
547651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=20, nvalign=4]
548651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
549651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
550651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct E
551651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1 (base) (empty)
552651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    2 |   struct B6 (base) (empty)
553651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    3 |   struct B3 (base) (empty)
554651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    4 |   struct B4 (base) (empty)
555651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   17 |   struct B5 (base) (empty)
556651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (E vbtable pointer)
557651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   20 |   int a
558651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
559651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
560651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
561dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
562dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct F : B1, B6, B4, B8, B5, virtual B0 {
563dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
564651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	F() : a(0x0000000F) { printf("&a = %p\n", &a); printf("F = %p\n", this); }
565dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
566dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
567dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
568651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct F
569651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1 (base) (empty)
570651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    2 |   struct B6 (base) (empty)
571651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    3 |   struct B4 (base) (empty)
572651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    3 |   struct B8 (base)
573651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    3 |     char [5] c
574651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   struct B5 (base) (empty)
575651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (F vbtable pointer)
576651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   int a
577651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0 (virtual base) (empty)
578651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
579651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
580651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
581651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct F
582651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1 (base) (empty)
583651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    2 |   struct B6 (base) (empty)
584651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    3 |   struct B4 (base) (empty)
585651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    3 |   struct B8 (base)
586651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    3 |     char [5] c
587651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B5 (base) (empty)
588651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (F vbtable pointer)
589651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   int a
590651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0 (virtual base) (empty)
591651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
592651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
593dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
594dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct G : B8, B1, virtual B0 {
595dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
596dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	__declspec(align(16)) int a1;
597651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	G() : a(0x00000010), a1(0xf0000010) { printf("G = %p\n", this); }
598dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
599dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
600dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
601651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct G
602651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B8 (base)
603651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     char [5] c
604651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   21 |   struct B1 (base) (empty)
605651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    8 |   (G vbtable pointer)
606651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   24 |   int a
607651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   32 |   int a1
608651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   48 |   struct B0 (virtual base) (empty)
609651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=48, align=16
610651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=48, nvalign=16]
611651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
612651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct G
613651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B8 (base)
614651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     char [5] c
615651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   21 |   struct B1 (base) (empty)
616651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (G vbtable pointer)
617651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   int a
618651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   32 |   int a1
619651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   48 |   struct B0 (virtual base) (empty)
620651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=48, align=16
621651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=48, nvalign=16]
622dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
623dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct AX : B1X, B2X, B3X, B4X, virtual B0X {
624dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
625651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	AX() : a(0x0000000A) { printf(" A = %p\n", this); }
626dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
627dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
628dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
629651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
630651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
631651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
632651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
633651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
634651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct AX
635651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1X (base) (empty)
636651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B2X (base) (empty)
637651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   18 |   struct B3X (base) (empty)
638651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   35 |   struct B4X (base) (empty)
639651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   20 |   (AX vbtable pointer)
640651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   36 |   int a
641651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   48 |   struct B0X (virtual base) (empty)
642651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=48, align=16
643651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=48, nvalign=16]
644651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
645651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
646651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
647651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
648651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
649651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
650651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct AX
651651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1X (base) (empty)
652651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   struct B2X (base) (empty)
653651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   18 |   struct B3X (base) (empty)
654651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   35 |   struct B4X (base) (empty)
655651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   (AX vbtable pointer)
656651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   36 |   int a
657651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   48 |   struct B0X (virtual base) (empty)
658651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=48, align=16
659651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=48, nvalign=16]
660dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
661dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct BX : B2X, B1X, B3X, B4X, virtual B0X {
662dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
663651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	BX() : a(0x0000000B) { printf(" B = %p\n", this); }
664dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
665dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
666dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
667651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct BX
668651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B2X (base) (empty)
669651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    1 |   struct B1X (base) (empty)
670651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    2 |   struct B3X (base) (empty)
671651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   19 |   struct B4X (base) (empty)
672651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    4 |   (BX vbtable pointer)
673651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   20 |   int a
674651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   32 |   struct B0X (virtual base) (empty)
675651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=32, align=16
676651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=32, nvalign=16]
677651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
678651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct BX
679651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B2X (base) (empty)
680651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    1 |   struct B1X (base) (empty)
681651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    2 |   struct B3X (base) (empty)
682651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   19 |   struct B4X (base) (empty)
683651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (BX vbtable pointer)
684651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   20 |   int a
685651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   32 |   struct B0X (virtual base) (empty)
686651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=32, align=16
687651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=32, nvalign=16]
688dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
689dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct CX : B1X, B3X, B2X, virtual B0X {
690dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
691651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	CX() : a(0x0000000C) { printf(" C = %p\n", this); }
692dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
693dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
694dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
695651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct CX
696651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B1X (base) (empty)
697651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    2 |   struct B3X (base) (empty)
698651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   32 |   struct B2X (base) (empty)
699651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   (CX vbtable pointer)
700651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   32 |   int a
701651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   48 |   struct B0X (virtual base) (empty)
702651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=48, align=16
703651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=48, nvalign=16]
704651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
705651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct CX
706651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B1X (base) (empty)
707651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    2 |   struct B3X (base) (empty)
708651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   32 |   struct B2X (base) (empty)
709651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   16 |   (CX vbtable pointer)
710651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   32 |   int a
711651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   48 |   struct B0X (virtual base) (empty)
712651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=48, align=16
713651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=48, nvalign=16]
714dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
715dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntstruct DX : B8X, B1X, virtual B0X {
716dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt	int a;
717651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines	DX() : a(0x0000000D) { printf(" D = %p\n", this); }
718dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt};
719dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
720dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt// CHECK: *** Dumping AST Record Layout
721651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
722651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct DX
723651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct B8X (base)
724651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     short a
725651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   10 |   struct B1X (base) (empty)
726651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    4 |   (DX vbtable pointer)
727651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   12 |   int a
728651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:   16 |   struct B0X (virtual base) (empty)
729651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=16, align=4
730651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
731651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
732651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
733651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct DX
734651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct B8X (base)
735651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     short a
736651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   18 |   struct B1X (base) (empty)
737651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    8 |   (DX vbtable pointer)
738651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   20 |   int a
739651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:   24 |   struct B0X (virtual base) (empty)
740651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=24, align=8
741651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
742651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
743651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
744651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesstruct C0 {};
745651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesstruct C1 : public C0 { int C1F0; };
746651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesstruct C2 : public C1, public C0 {};
747651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
748651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
749651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
750651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK: *** Dumping AST Record Layout
751651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 | struct C2
752651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |   struct C1 (base)
753651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     struct C0 (base) (empty)
754651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    0 |     int C1F0
755651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:    5 |   struct C0 (base) (empty)
756651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      | [sizeof=8, align=4
757651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-NEXT:      |  nvsize=8, nvalign=4]
758651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
759651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
760651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64: *** Dumping AST Record Layout
761651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 | struct C2
762651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |   struct C1 (base)
763651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     struct C0 (base) (empty)
764651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    0 |     int C1F0
765651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:    5 |   struct C0 (base) (empty)
766651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      | [sizeof=8, align=4
767651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-X64-NEXT:      |  nvsize=8, nvalign=4]
768dc58180432868cfa9c060d5c41114634e4b841c7Warren Hunt
7696bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinesstruct JA { char a; };
7706bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinesstruct JB {
7716bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  char a;
7726bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  virtual void f() {}
7736bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines};
7746bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinesstruct JC { char a; };
7756bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinesstruct JD : JA, JB, virtual JC {};
7766bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines
7776bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK: *** Dumping AST Record Layout
7786bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK: *** Dumping AST Record Layout
7796bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK: *** Dumping AST Record Layout
7806bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK: *** Dumping AST Record Layout
7816bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:    0 | struct JD
7826bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:    0 |   struct JB (primary base)
7836bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:    0 |     (JB vftable pointer)
7846bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:    4 |     char a
7856bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:   12 |   struct JA (base)
7866bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:   12 |     char a
7876bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:    8 |   (JD vbtable pointer)
7886bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:   16 |   struct JC (virtual base)
7896bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:   16 |     char a
7906bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:      | [sizeof=17, align=4
7916bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-NEXT:      |  nvsize=16, nvalign=4]
7926bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64: *** Dumping AST Record Layout
7936bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64: *** Dumping AST Record Layout
7946bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64: *** Dumping AST Record Layout
7956bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64: *** Dumping AST Record Layout
7966bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:    0 | struct JD
7976bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:    0 |   struct JB (primary base)
7986bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:    0 |     (JB vftable pointer)
7996bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:    8 |     char a
8006bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:   24 |   struct JA (base)
8016bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:   24 |     char a
8026bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:   16 |   (JD vbtable pointer)
8036bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:   32 |   struct JC (virtual base)
8046bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:   32 |     char a
8056bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:      | [sizeof=40, align=8
8066bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// CHECK-X64-NEXT:      |  nvsize=32, nvalign=8]
8076bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines
808dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntint a[
809dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AA)+
810dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AB)+
811dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AC)+
812dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AD)+
813dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AA1)+
814dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AB1)+
815dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AC1)+
816dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AD1)+
817dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AA2)+
818dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AB2)+
819dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AC2)+
820dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AD2)+
821dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AA3)+
822dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AB3)+
823dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AC3)+
824dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AD3)+
825dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(B)+
826dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(C)+
827dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(D)+
828dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(E)+
829dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(F)+
830dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(G)+
831dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(AX)+
832dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(BX)+
833dc58180432868cfa9c060d5c41114634e4b841c7Warren Huntsizeof(CX)+
834651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinessizeof(DX)+
8356bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinessizeof(C2)+
8366bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinessizeof(JD)+
8376bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines0];
838