summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr20368-3.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-30 19:35:49 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-30 19:35:49 +0000
commit494fc9d0f43f28049e7334c2f16183a700da3882 (patch)
tree2be5b945b2d43442ad7d484da300b889093ef64a /gcc/testsuite/gcc.dg/pr20368-3.c
parent4bf029b0b9dcf64502730c507a0498ba843787a7 (diff)
downloadgcc-494fc9d0f43f28049e7334c2f16183a700da3882.tar.gz
PR c/20368
* c-decl.c (start_function): Check for old_decl being error_mark_node. testsuite: * gcc.dg/pr20368-1.c, gcc.dg/pr20368-2.c, gcc.dg/pr20368-3.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97270 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr20368-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr20368-3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr20368-3.c b/gcc/testsuite/gcc.dg/pr20368-3.c
new file mode 100644
index 00000000000..32095999676
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20368-3.c
@@ -0,0 +1,12 @@
+/* ICE with -Wstrict-prototypes and typeof an undeclared function.
+ Bug 20368. Test with -Wmissing-declarations. */
+/* { dg-do compile } */
+/* { dg-options "-Wmissing-declarations" } */
+
+extern __typeof (f) g; /* { dg-error "error: 'f' undeclared here \\(not in a function\\)" } */
+
+int
+f (x)
+ float x;
+{
+}