| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -fdump-tree-optimized" } */ |
| 3 |
|
| 4 |
void foo(void); |
| 5 |
static int a, c; |
| 6 |
static int *b = &a; |
| 7 |
static int **d = &b; |
| 8 |
void assert_fail() __attribute__((__noreturn__)); |
| 9 |
int main() { |
| 10 |
int *e = *d; |
| 11 |
if (e == &a || e == &c); |
| 12 |
else { |
| 13 |
__builtin_unreachable(); |
| 14 |
assert_fail(); |
| 15 |
} |
| 16 |
if (e == &a || e == &c); |
| 17 |
else |
| 18 |
foo(); |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-tree-dump-not "assert_fail" "optimized" } } */ |
| 22 |
/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |
| 23 |
|
| 24 |
|