* gcc.dg/decl-5.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79012
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-03-06 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/14114
+ * gcc.dg/decl-5.c: New test.
+
2004-03-05 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc.dg/20040305-1.c: New test.
--- /dev/null
+/* PR c/14114 */
+/* Origin: <snyder@fnal.gov> */
+/* { 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() {}