PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050613-1.c
blobf1b4e94c371f226717a495efcb011b03faa0dcf5
1 /* PR tree-optimization/22043 */
3 extern void abort (void);
5 struct A { int i; int j; int k; int l; };
6 struct B { struct A a; int r[1]; };
7 struct C { struct A a; int r[0]; };
8 struct D { struct A a; int r[]; };
10 void
11 foo (struct A *x)
13 if (x->i != 0 || x->j != 5 || x->k != 0 || x->l != 0)
14 abort ();
17 int
18 main ()
20 struct B b = { .a.j = 5 };
21 struct C c = { .a.j = 5 };
22 struct D d = { .a.j = 5 };
23 foo (&b.a);
24 foo (&c.a);
25 foo (&d.a);
26 return 0;