1 // RUN: %clang_cc1 -emit-llvm-only -triple i386-apple-darwin9 -fdump-record-layouts %s | FileCheck %s
5 short m
:9; // size is 2
7 short w
:13; // size is 8
8 short e
:3; // size is 8
10 char t
:7; // size is 10
11 short y
:16; // size is 12
12 short u
:1; // size is 14
13 char i
:2; // size is 15
15 char o
:6; // size is 20
16 char s
:2; // size is 20
17 short d
:10; // size is 22
18 short f
:4; // size is 22
20 char g
:1; // size is 24
21 short h
:13; // size is 26
22 char j
:8; // size is 27
23 char k
:5; // size is 28
25 int l
:28; // size is 33
26 char z
:7; // size is 34
27 int x
:20; // size is 38
28 } __attribute__((__ms_struct__
));
29 typedef struct _one_ms one_ms
;
31 static int a1
[(sizeof(one_ms
) == 38) - 1];
58 } __attribute__((__ms_struct__
));
60 typedef struct _two_ms two_ms
;
62 static int a2
[(sizeof(two_ms
) == 42) - 1];
89 } __attribute__((__ms_struct__
));
90 typedef struct _four_ms four_ms
;
92 static int a4
[(sizeof(four_ms
) == 48) - 1];
119 } __attribute__((__ms_struct__
));
121 typedef struct _eight_ms eight_ms
;
123 static int a8
[(sizeof(eight_ms
) == 48) - 1];
130 unsigned long d
: 10;
132 } __attribute__((__ms_struct__
));
134 // CHECK: 0 | struct test0
135 // CHECK-NEXT: 0:0-7 | unsigned long a
136 // CHECK-NEXT: 1:0-7 | unsigned long b
137 // CHECK-NEXT: 2:0-7 | unsigned long c
138 // CHECK-NEXT: 4:0-9 | unsigned long d
139 // CHECK-NEXT: 5:2-2 | unsigned long e
140 // CHECK-NEXT: | [sizeof=8, align=2]
142 static int test0
[(sizeof(struct test0
) == 8) ? 1 : -1];