gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-44.c
raw| 1 | /* { dg-do link } */ |
| 2 | /* { dg-options "-O -fdump-tree-dse1-details" } */ |
| 3 | |
| 4 | extern void foo(void); |
| 5 | int a, b; |
| 6 | static int c; |
| 7 | int main() |
| 8 | { |
| 9 | if (c) |
| 10 | foo (); |
| 11 | int *g = &c; |
| 12 | int **h = &g; |
| 13 | int ***h1 = &h; |
| 14 | if (a) |
| 15 | while (b) |
| 16 | b = 0; |
| 17 | } |
| 18 | |
| 19 | /* { dg-final { scan-tree-dump "Deleted dead store: g = &c;" "dse1" } } */ |