aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-03-06 10:28:51 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-03-06 09:28:51 +0000
commit64a3ee6bd9f60bc86472b21fadef0c1287a3d314 (patch)
tree4db8a722162ef428d3728807970f65b2dcb80f5d
parentce3455909f4df5ed1e14408fbf64d221a093a69c (diff)
downloadgcc-64a3ee6bd9f60bc86472b21fadef0c1287a3d314.zip
gcc-64a3ee6bd9f60bc86472b21fadef0c1287a3d314.tar.gz
gcc-64a3ee6bd9f60bc86472b21fadef0c1287a3d314.tar.bz2
re PR c/14114 ([unit-at-a-time] ICE in gen_subprogram_die)
PR c/14114 * gcc.dg/decl-5.c: New test. From-SVN: r79012
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/decl-5.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 00a174a..ee99b80 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/gcc/testsuite/gcc.dg/decl-5.c b/gcc/testsuite/gcc.dg/decl-5.c
new file mode 100644
index 0000000..d7c36a4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/decl-5.c
@@ -0,0 +1,20 @@
+/* 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() {}