OSDN Git Service

* gcc.dg/cpp/cmdlne-P.c: New test.
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Dec 2000 19:37:18 +0000 (19:37 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Dec 2000 19:37:18 +0000 (19:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38360 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/cmdlne-P.c [new file with mode: 0644]

index 89b9518..1ebf446 100644 (file)
@@ -1,3 +1,7 @@
+2000-12-18  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * gcc.dg/cpp/cmdlne-P.c: New test.
+
 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * gcc.c-torture/execute/builtin-abs-1.c,
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-P.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-P.c
new file mode 100644 (file)
index 0000000..117c0ef
--- /dev/null
@@ -0,0 +1,13 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+
+/* { dg-do preprocess } */
+/* { dg-options "-P" } */
+
+/* Test that we don't stair-step output with -P.  Source: Neil Booth,
+   18 Dec 2000.  */
+
+int x = 1;
+
+/* { dg-final { if ![file exists cmdlne-P.i] { return }                } }
+   { dg-final { if { [grep cmdlne-P.i "^int x = 1;$"] != "" } { return } } }
+   { dg-final { fail "cmdlne-P.c: stair-stepping with -P"              } } */