aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste9.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/paste9.c b/gcc/testsuite/gcc.dg/cpp/paste9.c
new file mode 100644
index 0000000..35c86b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste9.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc. */
+
+/* { dg-do run } */
+/* { dg-options "" } */
+
+/* Apparently older preprocessors used to fail this test. */
+
+#include <string.h>
+
+extern void abort (void);
+
+#define S(str, args...) " " str "\n", ##args
+
+int
+main()
+{
+ const char *s = S("foo");
+
+ if (strchr (s, '\n') == NULL)
+ abort ();
+
+ return 0;
+}