Fix traditional cpp test failure
authorTamar Christina <tamar.christina@arm.com>
Tue, 8 Nov 2016 09:41:11 +0000 (09:41 +0000)
committerTamar Christina <tnfchris@gcc.gnu.org>
Tue, 8 Nov 2016 09:41:11 +0000 (09:41 +0000)
* 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
gcc/testsuite/gcc.dg/cpp/trad/include.c
gcc/testsuite/gcc.dg/cpp/trad/trad.exp

index acc09f38367f952535aed644445f8da823f52dfe..060b1a7d29103de5c3a461b58c20d8d1d784f61e 100644 (file)
@@ -1,3 +1,10 @@
+2016-11-08  Tamar Christina  <tamar.christina@arm.com>
+
+       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  <rguenther@suse.de>
 
        PR tree-optimization/78205
index 94d25f815c6807bfcb57a93a2c3193244ccf2a11..967476d3a1f3bdff8461e64e46ec438ce008033a 100644 (file)
@@ -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 <stdlib.h>            /* { dg-bogus "o such file or directory" } */
+#define builtins 1
+#include <builtins.h>          /* { dg-bogus "o such file or directory" } */
index 5f090ac54a0162e5e9fb4f4094f29cc26506f79e..01e1400b3c38a8a3b96ce523bae84ee850f65f46 100644 (file)
@@ -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