This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Add testcase from PR62294
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 3 Sep 2014 15:15:06 +0200
- Subject: [committed] Add testcase from PR62294
- Authentication-results: sourceware.org; auth=none
This adds a testcase for PR62294 that I just fixed on the 4.9
branch.
Tested on x86_64-linux, applying to trunk.
2014-09-03 Marek Polacek <polacek@redhat.com>
PR c/62294
* gcc.dg/pr62294.c: New test.
* gcc.dg/pr62294.h: New file.
diff --git gcc/testsuite/gcc.dg/pr62294.c gcc/testsuite/gcc.dg/pr62294.c
index e69de29..c6ec5a7 100644
--- gcc/testsuite/gcc.dg/pr62294.c
+++ gcc/testsuite/gcc.dg/pr62294.c
@@ -0,0 +1,10 @@
+/* PR c/62294 */
+/* { dg-do compile } */
+
+#include "pr62294.h"
+
+void
+fn (int *u)
+{
+ foo (u); /* { dg-error "passing argument 1 of .bar. from incompatible pointer type" } */
+}
diff --git gcc/testsuite/gcc.dg/pr62294.h gcc/testsuite/gcc.dg/pr62294.h
index e69de29..9be45ad 100644
--- gcc/testsuite/gcc.dg/pr62294.h
+++ gcc/testsuite/gcc.dg/pr62294.h
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+#define foo bar
+extern void foo (float *);
Marek