gcc/testsuite/gcc.dg/field-merge-23.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-O" } */ |
| 3 | |
| 4 | /* PR tree-optimization/118514 */ |
| 5 | |
| 6 | /* Check that we don't pull optimized references that could trap out of |
| 7 | loops. */ |
| 8 | |
| 9 | int a, c = 1; |
| 10 | unsigned char b[1], d; |
| 11 | int main() { |
| 12 | while (a || !c) { |
| 13 | signed char e = b[1000000000]; |
| 14 | d = e < 0 || b[1000000000] > 1; |
| 15 | if (d) |
| 16 | __builtin_abort (); |
| 17 | } |
| 18 | return 0; |
| 19 | } |