gcc/testsuite/gcc.dg/pr118081.c
raw| 1 | /* PR tree-optimization/118081 */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-options "-O2 -fno-tree-vrp -fno-expensive-optimizations" } */ |
| 4 | |
| 5 | int a, b; |
| 6 | |
| 7 | int |
| 8 | foo (int f) |
| 9 | { |
| 10 | return f ? f || 0 : f; |
| 11 | } |
| 12 | |
| 13 | void |
| 14 | bar (void) |
| 15 | { |
| 16 | b = a ? a : 1; |
| 17 | int i = foo (1 ^ b); |
| 18 | signed char h = i - 8; |
| 19 | if (h) |
| 20 | return; |
| 21 | __builtin_abort (); |
| 22 | } |
| 23 | |
| 24 | int |
| 25 | main () |
| 26 | { |
| 27 | bar (); |
| 28 | } |