// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -fdump-record-layouts \
// RUN: -fsyntax-only -fxl-pragma-pack -x c %s | \
// RUN: FileCheck --check-prefixes=CHECK,CHECK32 %s
// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -fdump-record-layouts \
// RUN: -fsyntax-only -fxl-pragma-pack -x c++ %s | \
// RUN: FileCheck --check-prefixes=CHECK,CHECK32 %s
// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fdump-record-layouts \
// RUN: -fsyntax-only -fxl-pragma-pack -x c %s | \
// RUN: FileCheck --check-prefixes=CHECK,CHECK64 %s
// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fdump-record-layouts \
// RUN: -fsyntax-only -fxl-pragma-pack -x c++ %s | \
// RUN: FileCheck --check-prefixes=CHECK,CHECK64 %s
A;
int a = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct A
// CHECK-NEXT: 0:0-1 | unsigned char c
// CHECK-NEXT: sizeof=4, {{(dsize=4, )?}}align=4, preferredalign=4
B;
int b = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct B
// CHECK-NEXT: 0 | char c
// CHECK-NEXT: 4:- | int
// CHECK-NEXT: sizeof=4, {{(dsize=4, )?}}align=4, preferredalign=4
C;
int c = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct C
// CHECK-NEXT: 0:0-5 | int a1
// CHECK-NEXT: 0:6-9 | signed char a2
// CHECK-NEXT: 1:2-3 | short a3
// CHECK-NEXT: 1:4-5 | int a4
// CHECK-NEXT: 1:6-10 | long a5
// CHECK-NEXT: 2:3-8 | long long a6
// CHECK32: 4:0-7 | unsigned long a7
// CHECK32: sizeof=8, {{(dsize=8, )?}}align=4, preferredalign=4
// CHECK64: 3:1-8 | unsigned long a7
// CHECK64: sizeof=8, {{(dsize=8, )?}}align=8, preferredalign=8
C1;
int c1 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct C1
// CHECK-NEXT: 0:0-5 | int a1
// CHECK-NEXT: 0:6-9 | signed char a2
// CHECK-NEXT: 1:2-3 | short a3
// CHECK-NEXT: 1:4-5 | int a4
// CHECK-NEXT: 1:6-10 | long a5
// CHECK-NEXT: 2:3-8 | long long a6
// CHECK-NEXT: 3:1-8 | unsigned long a7
// CHECK-NEXT: sizeof=5, {{(dsize=5, )?}}align=1, preferredalign=1
C2;
int c2 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct C2
// CHECK-NEXT: 0:0-5 | int a1
// CHECK-NEXT: 0:6-9 | signed char a2
// CHECK-NEXT: 1:2-3 | short a3
// CHECK-NEXT: 1:4-5 | int a4
// CHECK-NEXT: 1:6-10 | long a5
// CHECK-NEXT: 2:3-8 | long long a6
// CHECK-NEXT: 3:1-8 | unsigned long a7
// CHECK-NEXT: sizeof=8, {{(dsize=8, )?}}align=4, preferredalign=4
typedef short mySHORT;
D;
int d = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D
// CHECK-NEXT: 0:0-7 | char c
// CHECK-NEXT: 32:- | mySHORT
// CHECK-NEXT: sizeof=32, {{(dsize=32, )?}}align=32, preferredalign=32
typedef long myLONG;
D11;
int d11 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D11
// CHECK-NEXT: 0:0-7 | char c
// CHECK-NEXT: 32:- | myLONG
// CHECK-NEXT: sizeof=32, {{(dsize=32, )?}}align=32, preferredalign=32
typedef long myLONG2;
D12;
int d12 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D12
// CHECK-NEXT: 0:0-7 | char c
// CHECK32: 4:- | myLONG2
// CHECK32: sizeof=4, {{(dsize=4, )?}}align=4, preferredalign=4
// CHECK64: 8:- | myLONG2
// CHECK64: sizeof=8, {{(dsize=8, )?}}align=8, preferredalign=8
typedef long long myLONGLONG;
D21;
int d21 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D21
// CHECK-NEXT: 0:0-7 | char c
// CHECK-NEXT: 32:- | myLONGLONG
// CHECK-NEXT: sizeof=32, {{(dsize=32, )?}}align=32, preferredalign=32
typedef long long myLONGLONG2;
D22;
int d22 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D22
// CHECK-NEXT: 0:0-7 | char c
// CHECK32: 4:- | myLONGLONG2
// CHECK32: sizeof=4, {{(dsize=4, )?}}align=4, preferredalign=4
// CHECK64: 8:- | myLONGLONG2
// CHECK64: sizeof=8, {{(dsize=8, )?}}align=8, preferredalign=8
;
E;
int e = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct E
// CHECK-NEXT: 0:0-31 | enum LL e
// CHECK32-NEXT: sizeof=4, {{(dsize=4, )?}}align=4, preferredalign=4
// CHECK64-NEXT: sizeof=8, {{(dsize=8, )?}}align=8, preferredalign=8
;
E1;
int e1 = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct E1
// CHECK-NEXT: 0:0-31 | enum LL1 e
// CHECK-NEXT: sizeof=16, {{(dsize=16, )?}}align=16, preferredalign=16
F;
int f = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct F
// CHECK-NEXT: 0:0-31 | long long l
// CHECK-NEXT: sizeof=16, {{(dsize=16, )?}}align=16, preferredalign=16
G;
int s = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct G
// CHECK-NEXT: 0:0-44 | long long ll
// CHECK-NEXT: sizeof=8, {{(dsize=8, )?}}align=8, preferredalign=8
H;
int h = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct H
// CHECK-NEXT: 0 | char c
// CHECK-NEXT: 4:- | int
// CHECK-NEXT: 4 | int i
// CHECK-NEXT: sizeof=8, {{(dsize=8, )?}}align=1, preferredalign=1
I;
int i = sizeof;
// CHECK: *** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct I
// CHECK-NEXT: 0 | char c
// CHECK-NEXT: 4:- | int
// CHECK-NEXT: 4 | int i
// CHECK-NEXT: sizeof=8, {{(dsize=8, )?}}align=2, preferredalign=2