1/* PR tree-optimization/47428 */
2/* { dg-require-effective-target untyped_assembly } */
3
4struct S
5{
6  int s;
7} a;
8int b;
9
10void bar (struct S);
11
12int
13baz (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
21void
22foo (void)
23{
24  fn (0);
25}
26
27int
28fn (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
37void
38bar (struct S x)
39{
40  for (;;)
41    for (; x.s;)
42      b = 0 ? : baz (0, 0);
43}
44