gcc/testsuite/gcc.dg/tree-ssa/ssa-sccvn-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-fre1" } */ |
| 3 | int *p; |
| 4 | int main(int argc, char **argv) |
| 5 | { |
| 6 | int result; |
| 7 | *p = 2; |
| 8 | if (argc) |
| 9 | *p = 2; |
| 10 | result = *p; |
| 11 | return result; |
| 12 | } |
| 13 | /* We should eliminate result = *p by saying it has the value 2. */ |
| 14 | /* { dg-final { scan-tree-dump "return 2;" "fre1"} } */ |