aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/strify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/strify.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/strify.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/strify.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/strify.c
new file mode 100644
index 000000000..d97a43970
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/strify.c
@@ -0,0 +1,18 @@
+/* Test whether traditional stringify works. */
+/* { dg-do run } */
+
+#define foo(a, b) c="a"; d="b";
+
+extern void abort ();
+extern void exit (int);
+
+int main ()
+{
+ char *c, *d;
+
+ foo (p,q);
+ if (c[0] != 'p' || d[0] != 'q')
+ abort ();
+
+ exit (0);
+}