// RUN: %clang_cc1 -emit-llvm-only -triple s390x-none-zos -fdump-record-layouts %s | FileCheck %s --check-prefix=CHECK
// RUN: %clang_cc1 -emit-llvm -triple s390x-none-zos %s -o - | FileCheck %s --check-prefix=DECL
static int v0;
int v1;
typedef int int32;
static int32 v2;
int32 v3;
int
// DECL: @v0 {{.*}} align 16
// DECL-NEXT: @v1 {{.*}} align 32
// DECL-NEXT: @v2 {{.*}} align 16
// DECL-NEXT: @v3 {{.*}} align 32
const CS0 = ;
// CHECK: 0 | struct cs0
// CHECK-NEXT: 0:- | unsigned long
// CHECK-NEXT: 0 | long long a
// CHECK-NEXT: | [sizeof=8, align=8]
volatile VS0;
// CHECK: 0 | struct vs0
// CHECK-NEXT: 0:- | long
// CHECK-NEXT: 0 | short a
// CHECK-NEXT: | [sizeof=2, align=2]
S0;
// CHECK: 0 | struct s0
// CHECK-NEXT: 0:0-2 | short a
// CHECK-NEXT: 0:3-7 | long b
// CHECK-NEXT: 1:0-0 | int c
// CHECK-NEXT: 1:1-10 | long d
// CHECK-NEXT: 2:3-7 | char e
// CHECK-NEXT: | [sizeof=3, align=1]
S1;
// CHECK: 0 | struct s1
// CHECK-NEXT: 0:0-6 | char a
// CHECK-NEXT: 0:7-33 | long b
// CHECK-NEXT: 4:2-3 | int c
// CHECK-NEXT: | [sizeof=5, align=1]
S2;
// CHECK: 0 | struct s2
// CHECK-NEXT: 0:0-6 | char a
// CHECK-NEXT: 4:- | char
// CHECK-NEXT: 4:- | short
// CHECK-NEXT: 4:- | short
// CHECK-NEXT: | [sizeof=4, align=4]
S3;
// CHECK: 0 | struct s3
// CHECK-NEXT: 0 | int a
// CHECK-NEXT: 4:0-15 | int b
// CHECK-NEXT: 8:- | char
// CHECK-NEXT: 8:0-0 | char c
// CHECK-NEXT: | [sizeof=12, align=4]
S4;
// CHECK: 0 | struct s4
// CHECK-NEXT: 0 | unsigned int a
// CHECK-NEXT: | [sizeof=32, align=32]
S5;
// CHECK: 0 | struct s5
// CHECK-NEXT: 0 | char a
// CHECK-NEXT: 4:0-18 | int b
// CHECK-NEXT: 8:0-21 | int c
// CHECK-NEXT: 12:- | int
// CHECK-NEXT: 12:0-9 | int d
// CHECK-NEXT: | [sizeof=16, align=8]
S6;
// CHECK: 0 | struct s6
// CHECK-NEXT: 0 | char * a
// CHECK-NEXT: 8 | char *[] b
// CHECK-NEXT: | [sizeof=8, align=8]
S7;
// CHECK: 0 | struct s7
// CHECK-NEXT: 0:- | long
// CHECK-NEXT: 0 | short a
// CHECK-NEXT: | [sizeof=2, align=2]
S8;
// CHECK: 0 | struct s8
// CHECK-NEXT: 0:- | unsigned long
// CHECK-NEXT: 0 | long long a
// CHECK-NEXT: | [sizeof=8, align=2]
S9;
// CHECK: 0 | struct s9
// CHECK-NEXT: 0:- | unsigned int
// CHECK-NEXT: 0:- | unsigned short
// CHECK-NEXT: | [sizeof=0, align=1]
S10;
// CHECK: 0 | struct s10
// CHECK-NEXT: 0 | unsigned int a
// CHECK-NEXT: | [sizeof=8, align=8]
S11;
// CHECK: 0 | struct s11
// CHECK-NEXT: 0 | char a
// CHECK-NEXT: 8:- | long
// CHECK-NEXT: 8 | char b
// CHECK-NEXT: | [sizeof=16, align=8]
U0 ;
// CHECK: 0 | union u0
// CHECK-NEXT: 0 | unsigned short d1
// CHECK-NEXT: 0:0-9 | int d2
// CHECK-NEXT: 0 | long d3
// CHECK-NEXT: | [sizeof=8, align=8]
U1;
// CHECK: 0 | union u1
// CHECK-NEXT: 0:- | unsigned int
// CHECK-NEXT: 0 | short a
// CHECK-NEXT: | [sizeof=4, align=4]
U2;
// CHECK: 0 | union u2
// CHECK-NEXT: 0:- | long
// CHECK-NEXT: 0 | short a
// CHECK-NEXT: | [sizeof=8, align=8]
U3;
// CHECK: 0 | union u3
// CHECK-NEXT: 0:- | unsigned char
// CHECK-NEXT: 0:- | unsigned short
// CHECK-NEXT: | [sizeof=0, align=4]