gcc/testsuite/g++.dg/pr106474.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-evrp " } */ |
| 3 | |
| 4 | void foo(); |
| 5 | static void __attribute__ ((noinline)) DCEMarker0_() {foo ();} |
| 6 | |
| 7 | void f(bool s, bool c) { |
| 8 | if ((!c == !s) && !c) { |
| 9 | if (s) { |
| 10 | DCEMarker0_(); |
| 11 | } |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | // With equivalences, vrp should be able to remove all IFs. |
| 16 | /* { dg-final { scan-tree-dump-not "goto" "evrp" } } */ |