gcc/testsuite/gcc.c-torture/execute/pr85156.c
raw| 1 | /* PR tree-optimization/85156 */ |
| 2 | |
| 3 | int x, y; |
| 4 | |
| 5 | __attribute__((noipa)) int |
| 6 | foo (int z) |
| 7 | { |
| 8 | if (__builtin_expect (x ? y != 0 : 0, z++)) |
| 9 | return 7; |
| 10 | return z; |
| 11 | } |
| 12 | |
| 13 | int |
| 14 | main () |
| 15 | { |
| 16 | x = 1; |
| 17 | asm volatile ("" : "+m" (x), "+m" (y)); |
| 18 | if (foo (10) != 11) |
| 19 | __builtin_abort (); |
| 20 | return 0; |
| 21 | } |