summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
blob: 3063f422c9ba86a8cfeb172fe6987223a6de2afd (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-message "note: previous declaration" } */
  int size = 2;
  int i = foo (s, s + size);	/* { dg-error "redeclaration of" } */
}