gcc/testsuite/gcc.c-torture/execute/pr93744-2.c
raw| 1 | /* PR tree-optimization/93744 */ |
| 2 | |
| 3 | int w; |
| 4 | |
| 5 | int |
| 6 | foo (int x, int y, int z) |
| 7 | { |
| 8 | int r = z - ((z - w++) & -(x < y)); |
| 9 | return r; |
| 10 | } |
| 11 | |
| 12 | int |
| 13 | main () |
| 14 | { |
| 15 | w = 4; |
| 16 | if (foo (5, 7, 12) != 4 || w != 5) |
| 17 | __builtin_abort (); |
| 18 | if (foo (7, 5, 12) != 12 || w != 6) |
| 19 | __builtin_abort (); |
| 20 | return 0; |
| 21 | } |