gcc/testsuite/gcc.dg/tail-merge-store.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */ |
| 3 | |
| 4 | int z; |
| 5 | int x; |
| 6 | |
| 7 | void |
| 8 | f (int c, int d) |
| 9 | { |
| 10 | if (c) |
| 11 | z = 5; |
| 12 | else |
| 13 | { |
| 14 | if (d) |
| 15 | x = 4; |
| 16 | z = 5; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-tree-dump-times "duplicate of" 1 "pre"} } */ |
| 21 | /* { dg-final { scan-tree-dump-times "z = 5" 1 "pre"} } */ |