gcc/testsuite/gcc.dg/torture/pr112281-1.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-additional-options "-ftree-loop-distribution" } */ |
| 3 | |
| 4 | struct { |
| 5 | int : 8; |
| 6 | int a; |
| 7 | } b, d[4] = {{0}, {0}, {0}, {5}}; |
| 8 | int c, e; |
| 9 | int main() { |
| 10 | for (c = 2; c; c--) |
| 11 | for (e = 0; e < 2; e++) { |
| 12 | d[c] = b = d[c + 1]; |
| 13 | d[c + 1].a = 0; |
| 14 | } |
| 15 | if (b.a != 0) |
| 16 | __builtin_abort(); |
| 17 | return 0; |
| 18 | } |