summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr45750.c
blob: 22c471b7070044cd488be6f81475d61b2eeef1df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O" } */

struct S
{
  int i;
};

int invalid[] = 0; /* { dg-error "invalid initializer" } */

void foo (void)
{
  if (((struct S *)undeclared)->i); /* { dg-error "undeclared" } */
}

/* { dg-message "reported only once" "" { target *-*-* } 13 } */