gcc/testsuite/gcc.c-torture/execute/20170419-1.c
raw| 1 | /* PR tree-optimization/80426 */ |
| 2 | /* Testcase by <[email protected]> */ |
| 3 | |
| 4 | #define INT_MAX 0x7fffffff |
| 5 | #define INT_MIN (-INT_MAX-1) |
| 6 | |
| 7 | int x; |
| 8 | |
| 9 | int main (void) |
| 10 | { |
| 11 | volatile int a = 0; |
| 12 | volatile int b = -INT_MAX; |
| 13 | int j; |
| 14 | |
| 15 | for(j = 0; j < 18; j += 1) { |
| 16 | x = ( (a == 0) != (b - (int)(INT_MIN) ) ); |
| 17 | } |
| 18 | |
| 19 | if (x != 0) |
| 20 | __builtin_abort (); |
| 21 | |
| 22 | return 0; |
| 23 | } |
| 24 |