1 // RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -fdump-record-layouts \
2 // RUN: -fxl-pragma-pack -fsyntax-only %s | \
5 // RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fdump-record-layouts \
6 // RUN: -fxl-pragma-pack -fsyntax-only %s | \
10 #pragma align(natural)
26 // CHECK: *** Dumping AST Record Layout
27 // CHECK-NEXT: 0 | struct test1::A
28 // CHECK-NEXT: 0 | int i1
29 // CHECK-NEXT: | [sizeof=4, dsize=4, align=4, preferredalign=4,
30 // CHECK-NEXT: | nvsize=4, nvalign=4, preferrednvalign=4]
32 // CHECK: *** Dumping AST Record Layout
33 // CHECK-NEXT: 0 | struct test1::B
34 // CHECK-NEXT: 0 | double d1
35 // CHECK-NEXT: | [sizeof=8, dsize=8, align=4, preferredalign=8,
36 // CHECK-NEXT: | nvsize=8, nvalign=4, preferrednvalign=8]
38 // CHECK: *** Dumping AST Record Layout
39 // CHECK-NEXT: 0 | struct test1::C
40 // CHECK-NEXT: 0 | struct test1::A (base)
41 // CHECK-NEXT: 0 | int i1
42 // CHECK-NEXT: 4 | struct test1::B (base)
43 // CHECK-NEXT: 4 | double d1
44 // CHECK-NEXT: 12 | double d2
45 // CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4,
46 // CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4]
56 #pragma align(natural)
64 // CHECK: *** Dumping AST Record Layout
65 // CHECK-NEXT: 0 | struct test2::A
66 // CHECK-NEXT: 0 | int i1
67 // CHECK-NEXT: 4 | double d
68 // CHECK-NEXT: | [sizeof=12, dsize=12, align=4, preferredalign=4,
69 // CHECK-NEXT: | nvsize=12, nvalign=4, preferrednvalign=4]
71 // CHECK: *** Dumping AST Record Layout
72 // CHECK-NEXT: 0 | struct test2::B
73 // CHECK-NEXT: 0 | struct test2::A (base)
74 // CHECK-NEXT: 0 | int i1
75 // CHECK-NEXT: 4 | double d
76 // CHECK-NEXT: 12 | int i2
77 // CHECK-NEXT: | [sizeof=16, dsize=16, align=4, preferredalign=4,
78 // CHECK-NEXT: | nvsize=16, nvalign=4, preferrednvalign=4]
83 #pragma align(natural)
97 // CHECK: *** Dumping AST Record Layout
98 // CHECK-NEXT: 0 | struct test3::A
99 // CHECK-NEXT: 0 | int i1
100 // CHECK-NEXT: 8 | double d
101 // CHECK-NEXT: | [sizeof=16, dsize=16, align=4, preferredalign=8,
102 // CHECK-NEXT: | nvsize=16, nvalign=4, preferrednvalign=8]
104 // CHECK: *** Dumping AST Record Layout
105 // CHECK-NEXT: 0 | struct test3::B
106 // CHECK-NEXT: 0 | struct test3::A a
107 // CHECK-NEXT: 0 | int i1
108 // CHECK-NEXT: 8 | double d
109 // CHECK-NEXT: 16 | int i2
110 // CHECK-NEXT: | [sizeof=24, dsize=24, align=4, preferredalign=8,
111 // CHECK-NEXT: | nvsize=24, nvalign=4, preferrednvalign=8]
121 #pragma align(natural)
130 // CHECK: *** Dumping AST Record Layout
131 // CHECK-NEXT: 0 | struct test4::A
132 // CHECK-NEXT: 0 | int i1
133 // CHECK-NEXT: 4 | double d
134 // CHECK-NEXT: | [sizeof=12, dsize=12, align=4, preferredalign=4,
135 // CHECK-NEXT: | nvsize=12, nvalign=4, preferrednvalign=4]
137 // CHECK: *** Dumping AST Record Layout
138 // CHECK-NEXT: 0 | struct test4::B
139 // CHECK-NEXT: 0 | int i2
140 // CHECK-NEXT: 4 | struct test4::A a
141 // CHECK-NEXT: 4 | int i1
142 // CHECK-NEXT: 8 | double d
143 // CHECK-NEXT: | [sizeof=16, dsize=16, align=4, preferredalign=4,
144 // CHECK-NEXT: | nvsize=16, nvalign=4, preferrednvalign=4]