aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr28865.c
blob: 4ad0f5c43065c5235d1ee2b998a7304d0916bc56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-xfail-if "PR target/60602" { sparc*-*-solaris2.9* && { ! gas } } { "-O0" } } */

struct var_len
{
  int field1;
  const char field2[];
};

/* Note - strictly speaking this array declaration is illegal
   since each element has a variable length.  GCC allows it
   (for the moment) because it is used in existing code, such
   as glibc.  */
static const struct var_len var_array[] = 
{
  { 1, "Long exposure noise reduction" },
  { 2, "Shutter/AE lock buttons" },
  { 3, "Mirror lockup" }
};