summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/cpp-li1.c17
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c162eefd01e..cda4dd3d71c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * gcc.dg/cpp-li1.c: New test.
+
2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/sizeof5.C: New test.
diff --git a/gcc/testsuite/gcc.dg/cpp-li1.c b/gcc/testsuite/gcc.dg/cpp-li1.c
new file mode 100644
index 00000000000..de8b2a720c8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp-li1.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2000 Free Software Foundation.
+
+ by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */
+
+/* { dg-do preprocess } */
+
+/* The line number below must be just a few lines greater than the
+ actual line number. */
+#line 10 "baz"
+
+/*
+ { dg-final { if \{ [grep cpp-li1.i baz] != "" \} \{ } }
+ { dg-final { pass "cpp-li1.i: #line directive optimization" } }
+ { dg-final { \} else \{ } }
+ { dg-final { fail "cpp-li1.i: #line directive optimization" } }
+ { dg-final { \} } }
+*/
OpenPOWER on IntegriCloud