2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr36504.c
blobdbcf76648bf89aebd5c2968ff6407621eef6db0e
1 /* PR tree-optimization/36504 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fprefetch-loop-arrays -w" } */
5 struct A { struct { int a; } b[8]; };
6 struct B { int c; int d; };
7 struct C { struct B d; };
9 void bar (struct C *, int);
11 struct B
12 foo (struct C *p, struct A *e, int b)
14 struct B q;
15 bar (p, e->b[b].a);
16 return q;
19 void
20 baz (int b, struct A *e)
22 struct C p;
23 for (; b; ++b)
24 p.d = foo (&p, e, b);