aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-06-24 19:13:01 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-06-24 19:13:01 +0000
commit367e5f9e436b1bd74bc132292c27086a96728384 (patch)
tree786ba62ef15b9269230822c7e006b01dd8b1f5dd /gcc
parent609c7da9ab08b009fb7a9cacf68a40b3b39231b3 (diff)
downloadgcc-367e5f9e436b1bd74bc132292c27086a96728384.zip
gcc-367e5f9e436b1bd74bc132292c27086a96728384.tar.gz
gcc-367e5f9e436b1bd74bc132292c27086a96728384.tar.bz2
[Darwin, testsuite] Fix isystem-2.c.
For the test to succeed there needs to be some header that is to be found in the 'expected' place i.e. <sysroot>/usr/include/. It's important that it is not the name of a header for which fixincludes have been applied, since such headers will be found in the gcc include-fixed dir and, in general, reference additional headers. The dummy sysroot will prevent the additional headers from being found, resulting in a failed test. The fix is to use a header name that isn't expected to be present in a real sysroot. 2019-06-24 Iain Sandoe <iain@sandoe.co.uk> * gcc.dg/cpp/isysroot-1.c (main): Use <example.h> as the test header. * gcc.dg/cpp/usr/include/stdio.h: Rename... * gcc.dg/cpp/usr/include/example.h: ... to this. From-SVN: r272625
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/isysroot-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/cpp/usr/include/example.h (renamed from gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h)0
3 files changed, 15 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8a58f48..ec0566c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-24 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/cpp/isysroot-1.c: Use <example.h> as the test header.
+ * gcc.dg/cpp/usr/include/stdio.h: Rename...
+ * gcc.dg/cpp/usr/include/example.h: ... to this.
+
2019-06-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/90972
diff --git a/gcc/testsuite/gcc.dg/cpp/isysroot-1.c b/gcc/testsuite/gcc.dg/cpp/isysroot-1.c
index 7263ce4..4c54f9e 100644
--- a/gcc/testsuite/gcc.dg/cpp/isysroot-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/isysroot-1.c
@@ -1,10 +1,17 @@
/* { dg-options "-isysroot ${srcdir}/gcc.dg/cpp" } */
/* { dg-do compile { target *-*-darwin* } } */
-#include <stdio.h>
+/* For the test to succeed there needs to be some header that is to be found
+ in the 'expected' place i.e. <sysroot>/usr/include/. It's important that
+ it is not the name of a header for which fixincludes have been applied,
+ since such headers will be found in the gcc include-fixed dir and, in
+ general, reference additional headers. The dummy sysroot will prevent the
+ additional headers from being found, resulting in a failed test. So use
+ a header name we don't expect to see. */
+#include <example.h>
int main()
{
- /* Special stdio.h supplies function foo. */
+ /* Special example.h supplies function foo. */
void (*x)(void) = foo;
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h b/gcc/testsuite/gcc.dg/cpp/usr/include/example.h
index c674e89..c674e89 100644
--- a/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h
+++ b/gcc/testsuite/gcc.dg/cpp/usr/include/example.h