gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-45.c
raw| 1 | /* { dg-do link } */ |
| 2 | /* { dg-options "-O" } */ |
| 3 | |
| 4 | extern void foo(void); |
| 5 | int a, b; |
| 6 | static int c; |
| 7 | static void f() { |
| 8 | while (a) |
| 9 | for (; b; b--) |
| 10 | ; |
| 11 | } |
| 12 | void i() { |
| 13 | if (c) |
| 14 | foo(); |
| 15 | int *g = &c; |
| 16 | { |
| 17 | int **h[1] = {&g}; |
| 18 | f(); |
| 19 | } |
| 20 | } |
| 21 | int main() { |
| 22 | i(); |
| 23 | return 0; |
| 24 | } |