1 /* PR tree-optimization/36504 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fprefetch-loop-arrays -w" } */
4
5 struct A { struct { int a; } b[8]; };
6 struct B { int c; int d; };
7 struct C { struct B d; };
8
9 void bar (struct C *, int);
10
11 struct B
foo(struct C * p,struct A * e,int b)12 foo (struct C *p, struct A *e, int b)
13 {
14 struct B q;
15 bar (p, e->b[b].a);
16 return q;
17 }
18
19 void
baz(int b,struct A * e)20 baz (int b, struct A *e)
21 {
22 struct C p;
23 for (; b; ++b)
24 p.d = foo (&p, e, b);
25 }
26