gcc/testsuite/g++.dg/torture/pr81249.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-mavx2 -mprefer-avx128" { target x86_64-*-* i?86-*-* } } */ |
| 3 | |
| 4 | typedef struct rtx_def *rtx; |
| 5 | union rtunion { |
| 6 | rtx rt_rtx; |
| 7 | }; |
| 8 | struct rtx_def { |
| 9 | struct { |
| 10 | rtunion fld[0]; |
| 11 | } u; |
| 12 | rtx elem[]; |
| 13 | } a; |
| 14 | int b, c, d; |
| 15 | rtx e; |
| 16 | int main() { |
| 17 | for (;;) { |
| 18 | d = 0; |
| 19 | for (; d < b; d++) |
| 20 | if (a.elem[d]) |
| 21 | e = a.elem[d]->u.fld[1].rt_rtx; |
| 22 | if (e) |
| 23 | c = 0; |
| 24 | } |
| 25 | } |