summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-25 04:44:41 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-25 04:44:41 +0000
commita4186532dc0a3e786786f70912e9638d7f7070b8 (patch)
treeb4f0055a6ba4b434f38274e6d317a23ea4fbc4d6 /gcc
parente3ac90610dab3369e153148d06b648953732c144 (diff)
downloadppe42-gcc-a4186532dc0a3e786786f70912e9638d7f7070b8.tar.gz
ppe42-gcc-a4186532dc0a3e786786f70912e9638d7f7070b8.zip
* gcc.dg/cpp-li1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-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