diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 00a174a74c9..ee99b80507a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-03-06 Eric Botcazou + + PR c/14114 + * gcc.dg/decl-5.c: New test. + 2004-03-05 Andreas Krebbel * gcc.dg/20040305-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/decl-5.c b/gcc/testsuite/gcc.dg/decl-5.c new file mode 100644 index 00000000000..d7c36a4a1bc --- /dev/null +++ b/gcc/testsuite/gcc.dg/decl-5.c @@ -0,0 +1,20 @@ +/* PR c/14114 */ +/* Origin: */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g" } */ + +/* This used to fail because the compiler thought that the + declaration of 'c' from 'b' was shadowing that from 'a'. */ + +void a() +{ + void c(); + c(); +} /* { dg-bogus "error" "PR c/14114" { xfail *-*-* } } */ + +void b() +{ + void c(); +} + +void c() {}