summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr63567-2.c
blob: 5ea2b37c36d5c96b1c5cf728a3007e2ee04caeb3 (plain)
1
2
3
4
5
6
7
8
9
10
/* PR c/63567 */
/* { dg-do compile } */
/* { dg-options "-pedantic" } */

/* Allow initializing objects with static storage duration with
   compound literals.  This is being used in Linux kernel.  */

struct T { int i; };
struct S { struct T t; };
static struct S s = (struct S) { .t = { 42 } }; /* { dg-warning "initializer element is not constant" } */