[RISCV] Add MIPS P8700 processor (#119882)
[llvm-project.git] / clang / test / ASTMerge / struct / Inputs / struct2.c
blob49fe36d823d0c332401d9d106eef135d668a4cff
1 // Matches
2 struct S0 {
3 int field1;
4 float field2;
5 };
7 struct S0 x0;
9 // Mismatch in field type
10 struct S1 {
11 int field1;
12 float field2;
15 struct S1 x1;
17 // Mismatch in tag kind.
18 union S2 { int i; float f; } x2;
20 // Missing fields
21 struct S3 { int i; float f; } x3;
23 // Extra fields
24 struct S4 { int i; float f; } x4;
26 // Bit-field matches
27 struct S5 { int i : 8; unsigned j : 8; } x5;
29 // Bit-field mismatch
30 struct S6 { int i : 8; unsigned j; } x6;
32 // Bit-field mismatch
33 struct S7 { int i : 8; unsigned j : 16; } x7;
35 // Incomplete type
36 struct S8 { int i; float f; } *x8;
38 // Incomplete type
39 struct S9 *x9;
41 // Incomplete type
42 struct S10 *x10;
44 // Matches
45 struct ListNode {
46 int value;
47 struct ListNode *Next;
48 } xList;
50 // Mismatch due to struct used internally
51 struct DeepError {
52 int value;
53 struct DeeperError { int i; float f; } *Deeper;
54 } xDeep;
56 // Matches
57 struct {
58 int i;
59 float f;
60 } x11;
62 // Matches
63 typedef struct {
64 int i;
65 float f;
66 } S12;
68 S12 x12;
70 // Mismatch
71 typedef struct {
72 int i; // Mismatch here.
73 float f;
74 } S13;
76 S13 x13;
78 // Matches
79 struct Unnamed {
80 union {
81 struct {
82 int i;
83 } S;
84 struct {
85 float i;
86 } R;
87 } U;
88 } x14;
90 // Matches
91 struct DeepUnnamed {
92 union {
93 union {
94 struct {
95 long i;
96 } S;
97 struct {
98 int i;
99 } R;
100 } U1;
101 union {
102 struct {
103 long i;
104 } S;
105 struct {
106 float i;
107 } T;
108 } U2;
109 } U;
110 struct {
111 long i;
112 } V;
113 } x15;
115 // Mismatch due to unnamed struct used internally
116 struct DeepUnnamedError {
117 union {
118 union {
119 struct {
120 long i;
121 } S;
122 struct {
123 int i;
124 } R;
125 } U1;
126 union {
127 struct {
128 float i; // Mismatch here.
129 } S;
130 struct {
131 float i;
132 } T;
133 } U2;
134 } U;
135 struct {
136 long i;
137 } V;
138 } x16;