From ad11774fbe2227523423186b7a6a639e1b604281 Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Tue, 8 Nov 2016 09:41:11 +0000 Subject: [PATCH] Fix traditional cpp test failure * gcc.dg/cpp/trad/trad.exp (dg-runtest): Added $srcdir/$subdir/ to Include dirs. * gcc.dg/cpp/trad/include.c: Use local header file. From-SVN: r241957 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.dg/cpp/trad/include.c | 10 ++-------- gcc/testsuite/gcc.dg/cpp/trad/trad.exp | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index acc09f38367..060b1a7d291 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2016-11-08 Tamar Christina + + PR testsuite/78136 + * gcc.dg/cpp/trad/trad.exp + (dg-runtest): Added $srcdir/$subdir/ to Include dirs. + * gcc.dg/cpp/trad/include.c: Use local header file. + 2016-11-08 Richard Biener PR tree-optimization/78205 diff --git a/gcc/testsuite/gcc.dg/cpp/trad/include.c b/gcc/testsuite/gcc.dg/cpp/trad/include.c index 94d25f815c6..967476d3a1f 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/include.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/include.c @@ -2,11 +2,5 @@ /* Test that macros are not expanded in the <> quotes of #inlcude. */ -/* vxWorksCommon.h uses the "#" operator to construct the name of an - include file, thus making the file incompatible with -traditional-cpp. - Newlib uses ## when including stdlib.h as of 2007-09-07. */ -/* { dg-do preprocess { target { { ! vxworks_kernel } && { ! newlib } } } } */ - -#define __STDC__ 1 /* Stop complaints about non-ISO compilers. */ -#define stdlib 1 -#include /* { dg-bogus "o such file or directory" } */ +#define builtins 1 +#include /* { dg-bogus "o such file or directory" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp index 5f090ac54a0..01e1400b3c3 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp +++ b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp @@ -37,7 +37,7 @@ dg-init # Main loop. dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \ - "" $DEFAULT_TRADCPPFLAGS + "-I$srcdir/$subdir/" $DEFAULT_TRADCPPFLAGS # All done. dg-finish -- 2.30.2