gcc/testsuite/gcc.dg/tree-ssa/pr102705-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 | /* PR tree-optimization/102705 */ |
| 4 | /* { dg-final { scan-tree-dump-not "foo " "optimized" } } */ |
| 5 | |
| 6 | |
| 7 | void foo(void); |
| 8 | static int b; |
| 9 | static char c; |
| 10 | static short a(short d, short e) { return e == 0 || d && e == 1 ? 0 : d % e; } |
| 11 | int main() { |
| 12 | b = c = b >= 2 ? 0 : 1 >> b; |
| 13 | short f = a(0 >= 0 ^ c, 5); |
| 14 | if (f == c) |
| 15 | foo(); |
| 16 | a(0, 9); |
| 17 | } |