blob: a707ed2a5bf182ba72d4e9358d7bc68e5da71721 [file] [log] [blame]
Douglas Gregor4800d952010-02-11 19:21:55 +00001// Matches
Douglas Gregorb203c9e2010-02-11 18:18:11 +00002struct S0 {
3 int field1;
4 float field2;
5};
6
7struct S0 x0;
8
Douglas Gregor4800d952010-02-11 19:21:55 +00009// Mismatch in field type
Douglas Gregorb203c9e2010-02-11 18:18:11 +000010struct S1 {
11 int field1;
12 float field2;
13};
14
15struct S1 x1;
Douglas Gregor4800d952010-02-11 19:21:55 +000016
17// Mismatch in tag kind.
18union S2 { int i; float f; } x2;
19
20// Missing fields
21struct S3 { int i; float f; } x3;
22
23// Extra fields
24struct S4 { int i; float f; } x4;
25
26// Bit-field matches
27struct S5 { int i : 8; unsigned j : 8; } x5;
28
29// Bit-field mismatch
30struct S6 { int i : 8; unsigned j; } x6;
31
32// Bit-field mismatch
33struct S7 { int i : 8; unsigned j : 16; } x7;