gcc/testsuite/gcc.dg/torture/pr85244-1.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-additional-sources "pr85244-2.c" } */ |
| 3 | |
| 4 | struct s { |
| 5 | long a; |
| 6 | int b; |
| 7 | int tab[]; |
| 8 | }; |
| 9 | |
| 10 | extern const struct s val; |
| 11 | extern int idx; |
| 12 | extern void abort (void); |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | if (val.tab[0] != 42 || val.tab[1] != 1337 || val.tab[idx] != 1337) |
| 17 | abort (); |
| 18 | return 0; |
| 19 | } |