New test; derived from glibc regression
authorZack Weinberg <zack@gcc.gnu.org>
Sun, 28 Feb 1999 15:05:16 +0000 (15:05 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sun, 28 Feb 1999 15:05:16 +0000 (15:05 +0000)
From-SVN: r25507

gcc/testsuite/gcc.dg/990228-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/990228-1.c b/gcc/testsuite/gcc.dg/990228-1.c
new file mode 100644 (file)
index 0000000..4b846ea
--- /dev/null
@@ -0,0 +1,29 @@
+/* Regression test for cpp.  The following input may cause core dumps
+   or # line markers in the middle of the line.  */
+/* { dg-do preprocess } */
+
+#define foo(string, arg) bar(2, string, arg)
+
+foo ("\
+\
+\
+\
+\
+\
+\
+\
+\
+\
+\
+",
+NULL);
+
+/*
+   { dg-final { if ![file exists 990228-1.i] { return }                        } }
+   { dg-final { set tmp [grep 990228-1.i ".#"]                         } }
+   { dg-final { if { [string length $tmp] == 0 } \{                    } }
+   { dg-final {     pass "990228-1.c: linemarkers in middle of line"   } }
+   { dg-final { \} else \{                                             } }
+   { dg-final {     fail "990228-1.c: linemarkers in middle of line"    } }
+   { dg-final { \}                                                     } }
+ */