1 struct trash {
2 int x;
3 };
4
5 struct trash gf = { 13 };
6 struct trash gf2 = { 46 };
7
8 struct trash2 {
9 struct trash t;
10 };
11
12 struct trash3 {
13 int before;
14 struct trash t;
15 int after;
16 };
17
18 int
main()19 main() {
20 int x = 1;
21 struct trash lf = { 123 };
22 struct trash lf2 = { 456 };
23 struct trash lol = x? lf: lf2;
24 struct trash lol2 = !x? gf: gf2;
25 struct trash2 junktrash = { lf };
26 struct trash3 three0 = { 111, lf2 };
27 struct trash3 three1 = { 444, lf, 555 };
28 struct trash3 three2 = { .t = lf, .before = 555 };
29 struct sanity {
30 struct {
31 int x, y, z;
32 } s;
33 } s = {
34 1, 2, 3
35 };
36
37
38 printf("%d\n", lf.x);
39 printf("%d\n", lol.x);
40 printf("%d\n", lf2.x);
41 printf("%d %d\n", lol.x, lol2.x);
42 printf("%d\n", junktrash.t.x);
43
44 printf("%d %d %d\n", three0.before, three0.t.x, three0.after);
45 printf("%d %d %d\n", three1.before, three1.t.x, three1.after);
46 printf("%d %d %d\n", three2.before, three2.t.x, three2.after);
47
48 printf("%d %d %d\n", s.s.x, s.s.y, s.s.z);
49 }
50