summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/cpp/_Pragma5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/_Pragma5.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/_Pragma5.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/_Pragma5.c b/gcc/testsuite/gcc.dg/cpp/_Pragma5.c
new file mode 100644
index 00000000000..ace50412cc6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/_Pragma5.c
@@ -0,0 +1,14 @@
+/* { dg-do preprocess } */
+
+/* Based on Debian GNATS PR 8524. 17 Nov 2002. */
+
+#define ALPHA(A) alpha_ ## A
+#define BETA(B) beta_ ## B
+#define GAMMA(C) _Pragma("moose") ALPHA(C) BETA(C)
+GAMMA(baz);
+
+/*
+ { dg-final { if ![file exists _Pragma5.i] { return } } }
+ { dg-final { if { [grep _Pragma5.i "alpha_baz beta_baz;"] != "" } { return } } }
+ { dg-final { fail "_Pragma5.c: _Pragma in macro" } }
+*/
OpenPOWER on IntegriCloud