| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 |
/* PR tree-optimization/110841 */ |
| 4 |
/* The call to foo should be able to removed */ |
| 5 |
|
| 6 |
void foo(void); |
| 7 |
static int b, c, d; |
| 8 |
static signed char(a)(signed char e, signed char f) { return e - f; } |
| 9 |
int main() { |
| 10 |
for (; b <= 4; b++) |
| 11 |
; |
| 12 |
c = 0; |
| 13 |
for (; c >= -16; c = a(c, 4)) |
| 14 |
; |
| 15 |
signed char g = b; |
| 16 |
for (; d <= 0; d++) { |
| 17 |
if (!(((g) >= 5) && ((g) <= 5))) { |
| 18 |
__builtin_unreachable(); |
| 19 |
} |
| 20 |
if (c) return 0; |
| 21 |
g = 0; |
| 22 |
for (;;) { |
| 23 |
foo(); |
| 24 |
break; |
| 25 |
} |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */ |