| 1 |
/* PR middle-end/120608 */ |
| 2 |
/* { dg-do compile { target musttail } } */ |
| 3 |
/* { dg-options "-fsanitize=address -fno-exceptions" } */ |
| 4 |
|
| 5 |
[[gnu::noipa]] int |
| 6 |
foo (int x) |
| 7 |
{ |
| 8 |
return x; |
| 9 |
} |
| 10 |
|
| 11 |
[[gnu::noipa]] void |
| 12 |
bar (int *x, int *y, int *z) |
| 13 |
{ |
| 14 |
(void) x; |
| 15 |
(void) y; |
| 16 |
(void) z; |
| 17 |
} |
| 18 |
|
| 19 |
[[gnu::noipa]] int |
| 20 |
baz (int x) |
| 21 |
{ |
| 22 |
int a = 4; |
| 23 |
{ |
| 24 |
int b = 8; |
| 25 |
{ |
| 26 |
int c = 10; |
| 27 |
bar (&a, &b, &c); |
| 28 |
if (a + b + c == 22) |
| 29 |
[[gnu::musttail]] return foo (x); |
| 30 |
bar (&a, &b, &c); |
| 31 |
} |
| 32 |
bar (&a, &b, &a); |
| 33 |
} |
| 34 |
bar (&a, &a, &a); |
| 35 |
return 42; |
| 36 |
} |