summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
blob: aa57dc3d4932ab93df176805abea96d545c1894f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* PR c++/5713
   Test that there are no ICEs after redeclaration error.  */

int foo (const char*, const char*);

void bar (void)
{
  const char *s = "bar";
  int i;			/* { dg-error "previous declaration" } */
  int size = 2;
  int i = foo (s, s + size);	/* { dg-error "redeclaration of" } */
}
OpenPOWER on IntegriCloud