From cff244b2b26185436ea063ee9222632f50f4ee04 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 25 Feb 2000 04:44:41 +0000 Subject: [PATCH] * gcc.dg/cpp-li1.c: New test. From-SVN: r32144 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/cpp-li1.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/cpp-li1.c 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 + + * gcc.dg/cpp-li1.c: New test. + 2000-02-24 Nathan Sidwell * 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 */ + +/* { 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 { \} } } +*/