[flang] Don't needlessly instantiate distinct UNSIGNED cases for FINDLOC (#120471)
[llvm-project.git] / clang / test / CodeGen / ms_struct-bitfield-1.c
blob8758081a447c0e0f6362b6e62498a22f02d9680b
1 // RUN: %clang_cc1 -emit-llvm-only -triple x86_64-apple-darwin9 %s
3 #define ATTR __attribute__((__ms_struct__))
5 struct {
6 unsigned int bf_1 : 12;
7 unsigned int : 0;
8 unsigned int bf_2 : 12;
9 } ATTR t1;
10 static int a1[(sizeof(t1) == 8) -1];
12 struct
14 char foo : 4;
15 short : 0;
16 char bar;
17 } ATTR t2;
18 static int a2[(sizeof(t2) == 4) -1];
20 #pragma ms_struct on
21 struct
23 char foo : 4;
24 short : 0;
25 char bar;
26 } t3;
27 #pragma ms_struct off
28 static int a3[(sizeof(t3) == 4) -1];
30 struct
32 char foo : 6;
33 long : 0;
34 } ATTR t4;
35 static int a4[(sizeof(t4) == 8) -1];
37 struct
39 char foo : 4;
40 short : 0;
41 char bar : 8;
42 } ATTR t5;
43 static int a5[(sizeof(t5) == 4) -1];
45 struct
47 char foo : 4;
48 short : 0;
49 long : 0;
50 char bar;
51 } ATTR t6;
52 static int a6[(sizeof(t6) == 4) -1];
54 struct
56 char foo : 4;
57 long : 0;
58 short : 0;
59 char bar;
60 } ATTR t7;
61 static int a7[(sizeof(t7) == 16) -1];
63 struct
65 char foo : 4;
66 short : 0;
67 long : 0;
68 char bar:7;
69 } ATTR t8;
70 static int a8[(sizeof(t8) == 4) -1];
72 struct
74 char foo : 4;
75 long : 0;
76 short : 0;
77 char bar: 8;
78 } ATTR t9;
79 static int a9[(sizeof(t9) == 16) -1];
81 struct
83 char foo : 4;
84 char : 0;
85 short : 0;
86 int : 0;
87 long :0;
88 char bar;
89 } ATTR t10;
90 static int a10[(sizeof(t10) == 2) -1];