summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-29 17:36:46 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-29 17:36:46 +0000
commit4c4548bb50d988c63a67c86efaac1d1e3c1461ae (patch)
treefeeb7bcc2ca33fc90b3d2193ab87d8641f9730a2 /gcc/testsuite
parent9efe5be6a6214ab4d79c1fa5d513a6a63de6f18b (diff)
downloadgcc-4c4548bb50d988c63a67c86efaac1d1e3c1461ae.tar.gz
PR c/71573
* c-decl.c (implicitly_declare): Return decl early not only for error_mark_nodes, but for anything that is not a FUNCTION_DECL. * gcc.dg/noncompile/pr71573.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238885 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/pr71573.c14
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dbe2a3ae088..e29c07cb8b9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -8,6 +8,9 @@
PR c/71853
* gcc.dg/noncompile/pr71853.c: New test.
+ PR c/71573
+ * gcc.dg/noncompile/pr71573.c: New test.
+
2016-07-29 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/pr59833.c: Use dg-add-options ieee.
diff --git a/gcc/testsuite/gcc.dg/noncompile/pr71573.c b/gcc/testsuite/gcc.dg/noncompile/pr71573.c
new file mode 100644
index 00000000000..8ace94a77ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/pr71573.c
@@ -0,0 +1,14 @@
+/* PR c/71573 */
+/* { dg-do compile } */
+
+void
+f1 (void)
+{
+ extern int t;
+}
+
+void
+f2 (void)
+{
+ t (0); /* { dg-error "called object .t. is not a function or function pointer" } */
+}