aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr52769.c
blob: 138cecb14dc12036be1272557cac2af19f9c1f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}