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