diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c162eefd01ea..cda4dd3d71cd 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 000000000000..de8b2a720c89 --- /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 { \} } } +*/