gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-31.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fdump-tree-ccp1" } */ |
| 3 | |
| 4 | void h (void); |
| 5 | |
| 6 | int g (int i, int j) |
| 7 | { |
| 8 | int t = 0; |
| 9 | int i1; |
| 10 | |
| 11 | if (i == j) |
| 12 | t = 3; |
| 13 | for (i1 = 0; i1 < 10000; i1++) h(); |
| 14 | if (t != 5) |
| 15 | return 0; |
| 16 | else |
| 17 | return 1; |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "ccp1" } } */ |