gcc/testsuite/gcc.c-torture/execute/pr44858.c
raw| 1 | /* PR rtl-optimization/44858 */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | int a = 3; |
| 5 | int b = 1; |
| 6 | |
| 7 | __attribute__((noinline)) long long |
| 8 | foo (int x, int y) |
| 9 | { |
| 10 | return x / y; |
| 11 | } |
| 12 | |
| 13 | __attribute__((noinline)) int |
| 14 | bar (void) |
| 15 | { |
| 16 | int c = 2; |
| 17 | c &= foo (1, b) > b; |
| 18 | b = (a != 0) | c; |
| 19 | return c; |
| 20 | } |
| 21 | |
| 22 | int |
| 23 | main (void) |
| 24 | { |
| 25 | if (bar () != 0 || b != 1) |
| 26 | abort (); |
| 27 | return 0; |
| 28 | } |