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