aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp-mi2.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-04-07 21:09:51 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-04-07 21:09:51 +0000
commitf787c583ae1966a61ae9e1e8b5645ec5834de1ac (patch)
tree1cdc2119b4eff8f84b844f88f3a85efa4575cb1e /gcc/testsuite/gcc.dg/cpp-mi2.c
parentfbc18d1984e7b4c919f7e5a3aa05e0287270785a (diff)
downloadgcc-f787c583ae1966a61ae9e1e8b5645ec5834de1ac.zip
gcc-f787c583ae1966a61ae9e1e8b5645ec5834de1ac.tar.gz
gcc-f787c583ae1966a61ae9e1e8b5645ec5834de1ac.tar.bz2
cpplib.c (do_elif): Skip the rest of the line if we're not going to bother evaluating it.
* cpplib.c (do_elif): Skip the rest of the line if we're not going to bother evaluating it. (skip_if_group): Clear pfile->only_seen_white. Reorder loop to avoid pointless calls to the lexer. * gcc.dg/cpp-mi2.c: New test. * gcc.dg/cpp-mi2[abc].h: New files. From-SVN: r33008
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp-mi2.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp-mi2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp-mi2.c b/gcc/testsuite/gcc.dg/cpp-mi2.c
new file mode 100644
index 0000000..d5c814c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp-mi2.c
@@ -0,0 +1,12 @@
+/* Test for overly eager multiple include optimization.
+ Problem distilled from glibc 2.0.7's time.h, sys/time.h, timebits.h.
+ Problem noted by Tom Tromey <tromey@cygnus.com>. */
+/* { dg-do compile } */
+
+#include "cpp-mi2a.h"
+#include "cpp-mi2b.h"
+
+int main (void)
+{
+ return x;
+}