1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre-details -fno-tree-loop-im" } */
3 
4 struct Bar { int a; int b; };
5 struct Foo { int x; struct Bar y; };
6 
7 int __attribute__((const)) foo (struct Bar);
8 
bar(int b)9 int bar (int b)
10 {
11   struct Foo f;
12   int c;
13   while (b--)
14     {
15       c = foo(f.y);
16     }
17   return c;
18 }
19 
20 /* { dg-final { scan-tree-dump "Replaced foo \\(f.y\\)" "pre" } } */
21