This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Add testcase from PR62294


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]