| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-std=gnu17 -O3 -fdump-tree-optimized" } */ |
| 3 |
|
| 4 |
static int c, d, e, f; |
| 5 |
static short g; |
| 6 |
static int *h = &c; |
| 7 |
void foo(void); |
| 8 |
short(a)(); |
| 9 |
static unsigned b(unsigned char j, int l) { return j > l ? j : j << l; } |
| 10 |
static int *i(); |
| 11 |
static void k(int j, unsigned char l) { |
| 12 |
i(); |
| 13 |
g = f; |
| 14 |
f = g; |
| 15 |
for (; g;) { |
| 16 |
int m = 0; |
| 17 |
d = a(); |
| 18 |
for (; d;) { |
| 19 |
if (l) |
| 20 |
if (!(j >= -639457069 && j <= -639457069)) |
| 21 |
if (m) |
| 22 |
foo(); // This call should be elided |
| 23 |
m = !(10 != (l ^ b(j, 6))) & (0 > e); |
| 24 |
} |
| 25 |
} |
| 26 |
} |
| 27 |
static int *i() { |
| 28 |
for (; e; e = a(e, 6)) |
| 29 |
; |
| 30 |
return h; |
| 31 |
} |
| 32 |
int main() { k(c, c); } |
| 33 |
|
| 34 |
/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |