PR52769 reports a bug that has been fixed in 4.7, but the test case was never added. So I'd like to put this test in and close PR52769.
Ok? 2014-10-29 Marek Polacek <pola...@redhat.com> PR c/52769 * gcc.dg/pr52769.c: New test. diff --git gcc/testsuite/gcc.dg/pr52769.c gcc/testsuite/gcc.dg/pr52769.c index e69de29..138cecb 100644 --- gcc/testsuite/gcc.dg/pr52769.c +++ gcc/testsuite/gcc.dg/pr52769.c @@ -0,0 +1,24 @@ +/* PR c/52769 */ +/* { dg-do run } */ +/* { dg-options "-O3" } */ + +typedef struct +{ + int should_be_zero; + char s[6]; + int x; +} foo_t; + +int +main (void) +{ + volatile foo_t foo = { + .s = "123456", + .x = 2 + }; + + if (foo.should_be_zero != 0) + __builtin_abort (); + + return 0; +} Marek