summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/noncompile/20020220-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/20020220-1.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/noncompile/20020220-1.c b/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
new file mode 100644
index 000000000..3063f422c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/20020220-1.c
@@ -0,0 +1,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" } */
+}