1 /* PR tree-optimization/47428 */
2 /* { dg-require-effective-target untyped_assembly } */
3 
4 struct S
5 {
6   int s;
7 } a;
8 int b;
9 
10 void bar (struct S);
11 
12 int
baz(int x,int y)13 baz (int x __attribute__((unused)), int y)
14 {
15   int i;
16   for (i = 0; i < 1; i = 1)
17     for (y = 0; y < 1; y = 1);
18   return y;
19 }
20 
21 void
foo(void)22 foo (void)
23 {
24   fn (0);
25 }
26 
27 int
fn(const int x,int y)28 fn (const int x, int y __attribute__((unused)))
29 {
30   if (baz (baz (0, x), 0))
31     return 0;
32   else
33     bar (a);
34   return 0;
35 }
36 
37 void
bar(struct S x)38 bar (struct S x)
39 {
40   for (;;)
41     for (; x.s;)
42       b = 0 ? : baz (0, 0);
43 }
44