| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 |
/* PR tree-optimization/110450 */ |
| 4 |
/* the ranger should be able to figure out that based on the |
| 5 |
unreachable part of d not being zero, *b is also never 0. |
| 6 |
*/ |
| 7 |
|
| 8 |
|
| 9 |
void foo(void); |
| 10 |
static int a = 1; |
| 11 |
static int *b = &a, *c = &a; |
| 12 |
static short d, e; |
| 13 |
static signed char f = 11; |
| 14 |
static signed char(g)(signed char h, int i) { return h << i; } |
| 15 |
int main() { |
| 16 |
if (f) *c = g(0 >= a, 3); |
| 17 |
e = *c; |
| 18 |
d = e % f; |
| 19 |
if (d) { |
| 20 |
__builtin_unreachable(); |
| 21 |
} else if (*b) |
| 22 |
foo(); |
| 23 |
; |
| 24 |
} |
| 25 |
|
| 26 |
/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */ |