1 // RUN: %clang_cc1 -emit-llvm-only -triple x86_64-apple-darwin9 %s
3 #define ATTR __attribute__((__ms_struct__))
5 #define size_struct_0 1
6 #define size_struct_1 4
7 #define size_struct_2 24
8 #define size_struct_3 8
9 #define size_struct_4 32
10 #define size_struct_5 12
11 #define size_struct_6 40
12 #define size_struct_7 8
13 #define size_struct_8 20
14 #define size_struct_9 32
20 typedef struct _struct_0 struct_0
;
27 typedef struct _struct_1 struct_1
;
32 unsigned char member_1
:8;
34 unsigned char member_3
:5;
39 typedef struct _struct_2 struct_2
;
43 unsigned int member_0
:26;
44 unsigned char member_1
:2;
47 typedef struct _struct_3 struct_3
;
51 unsigned char member_0
:7;
58 typedef struct _struct_4 struct_4
;
62 unsigned short member_0
:12;
64 unsigned short member_2
:6;
67 typedef struct _struct_5 struct_5
;
71 unsigned char member_0
:7;
72 unsigned int member_1
:25;
79 typedef struct _struct_6 struct_6
;
86 typedef struct _struct_7 struct_7
;
90 unsigned char member_0
:7;
95 unsigned short member_5
:4;
96 unsigned char member_6
:3;
100 typedef struct _struct_8 struct_8
;
105 unsigned int member_1
:6;
108 unsigned int member_4
:22;
111 typedef struct _struct_9 struct_9
;
113 struct_0 test_struct_0
= { 123 };
114 struct_1 test_struct_1
= { 82, 1081 };
115 struct_2 test_struct_2
= { 20.0, 31, 407760, 1, 14916, 6712 };
116 struct_3 test_struct_3
= { 64616999, 1 };
117 struct_4 test_struct_4
= { 61, 20.0, 20.0, 12, 0 };
118 struct_5 test_struct_5
= { 909, 1, 57 };
119 struct_6 test_struct_6
= { 12, 21355796, 0, 20.0, 467, 20.0 };
120 struct_7 test_struct_7
= { 20.0 };
121 struct_8 test_struct_8
= { 126, 1821, 22, 125, 6, 0, 2432638 };
122 struct_9 test_struct_9
= { 20.0, 3, 23957, 20.0, 1001631 };
125 static int a0
[(sizeof (struct_0
) == size_struct_0
) -1];
126 static int a1
[(sizeof (struct_1
) == size_struct_1
) -1];
127 static int a2
[(sizeof (struct_2
) == size_struct_2
) -1];
128 static int a3
[(sizeof (struct_3
) == size_struct_3
) -1];
129 static int a4
[(sizeof (struct_4
) == size_struct_4
) -1];
130 static int a5
[(sizeof (struct_5
) == size_struct_5
) -1];
131 static int a6
[(sizeof (struct_6
) == size_struct_6
) -1];
132 static int a7
[(sizeof (struct_7
) == size_struct_7
) -1];
133 static int a8
[(sizeof (struct_8
) == size_struct_8
) -1];
134 static int a9
[(sizeof (struct_9
) == size_struct_9
) -1];