gcc/testsuite/gcc.dg/pr52769.c
raw| 1 | /* PR c/52769 */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-options "-O3" } */ |
| 4 | |
| 5 | typedef struct |
| 6 | { |
| 7 | int should_be_zero; |
| 8 | char s[6]; |
| 9 | int x; |
| 10 | } foo_t; |
| 11 | |
| 12 | int |
| 13 | main (void) |
| 14 | { |
| 15 | volatile foo_t foo = { |
| 16 | .s = "123456", |
| 17 | .x = 2 |
| 18 | }; |
| 19 | |
| 20 | if (foo.should_be_zero != 0) |
| 21 | __builtin_abort (); |
| 22 | |
| 23 | return 0; |
| 24 | } |