aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2021-08-09 12:35:23 +0200
committerTobias Burnus <tobias@codesourcery.com>2021-08-09 12:35:23 +0200
commit527a1cf32c27a3fbeaf6be7596241570d864cc4c (patch)
treec76fece24ae8ac75a0b82baccc16aeeb3d058af2 /gcc/testsuite/lib
parenta5e78ee60cd54dcceb9e7cfa42edd0c29c280f5c (diff)
downloadgcc-527a1cf32c27a3fbeaf6be7596241570d864cc4c.zip
gcc-527a1cf32c27a3fbeaf6be7596241570d864cc4c.tar.gz
gcc-527a1cf32c27a3fbeaf6be7596241570d864cc4c.tar.bz2
testsuite/lib/gfortran.exp: Add -I for ISO*.h [PR101305, PR101660]
This patch adds -I$specdir/libgfortran to GFORTRAN_UNDER_TEST, when set by proc gfortran_init. As the $specdir depends on the multilib setting, it has to be re-set for a different multilib; hence, we track whether a previous call to gfortran_init set that var or whether it was set differently. gcc/testsuite/ PR libfortran/101305 PR fortran/101660 * lib/gfortran.exp (gfortran_init): Add -I $specdir/libgfortran to GFORTRAN_UNDER_TEST; update it when set by previous gfortran_init call. * gfortran.dg/ISO_Fortran_binding_1.c: Use <...> not "..." for ISO_Fortran_binding.h's #include. * gfortran.dg/ISO_Fortran_binding_10.c: Likewise. * gfortran.dg/ISO_Fortran_binding_11.c: Likewise. * gfortran.dg/ISO_Fortran_binding_12.c: Likewise. * gfortran.dg/ISO_Fortran_binding_15.c: Likewise. * gfortran.dg/ISO_Fortran_binding_16.c: Likewise. * gfortran.dg/ISO_Fortran_binding_17.c: Likewise. * gfortran.dg/ISO_Fortran_binding_18.c: Likewise. * gfortran.dg/ISO_Fortran_binding_3.c: Likewise. * gfortran.dg/ISO_Fortran_binding_5.c: Likewise. * gfortran.dg/ISO_Fortran_binding_6.c: Likewise. * gfortran.dg/ISO_Fortran_binding_7.c: Likewise. * gfortran.dg/ISO_Fortran_binding_8.c: Likewise. * gfortran.dg/ISO_Fortran_binding_9.c: Likewise. * gfortran.dg/PR94327.c: Likewise. * gfortran.dg/PR94331.c: Likewise. * gfortran.dg/bind_c_array_params_3_aux.c: Likewise. * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: Likewise. * gfortran.dg/pr93524.c: Likewise.
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/gfortran.exp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp
index 1e7da11..cae6738 100644
--- a/gcc/testsuite/lib/gfortran.exp
+++ b/gcc/testsuite/lib/gfortran.exp
@@ -151,6 +151,7 @@ proc gfortran_init { args } {
global gcc_warning_prefix
global gcc_error_prefix
global TEST_ALWAYS_FLAGS
+ global gfortran_init_set_GFORTRAN_UNDER_TEST
# We set LC_ALL and LANG to C so that we get the same error messages as expected.
setenv LC_ALL C
@@ -166,7 +167,11 @@ proc gfortran_init { args } {
setenv LANG C.ASCII
}
- if ![info exists GFORTRAN_UNDER_TEST] then {
+ # GFORTRAN_UNDER_TEST as set below contains $specpath, which depends on
+ # the used multilib config. Thus, its value may need to be reset;
+ # that's tracked via gfortran_init_set_GFORTRAN_UNDER_TEST.
+ if { ![info exists GFORTRAN_UNDER_TEST]
+ || [info exists gfortran_init_set_GFORTRAN_UNDER_TEST] } then {
if [info exists TOOL_EXECUTABLE] {
set GFORTRAN_UNDER_TEST $TOOL_EXECUTABLE
} else {
@@ -178,7 +183,8 @@ proc gfortran_init { args } {
} else {
set specpath [get_multilibs]
}
- set GFORTRAN_UNDER_TEST [findfile $base_dir/../../gfortran "$base_dir/../../gfortran -B$base_dir/../../ -B$specpath/libgfortran/" [findfile $base_dir/gfortran "$base_dir/gfortran -B$base_dir/" [transform gfortran]]]
+ set gfortran_init_set_GFORTRAN_UNDER_TEST 1
+ set GFORTRAN_UNDER_TEST [findfile $base_dir/../../gfortran "$base_dir/../../gfortran -B$base_dir/../../ -B$specpath/libgfortran/ -I$specpath/libgfortran" [findfile $base_dir/gfortran "$base_dir/gfortran -B$base_dir/" [transform gfortran]]]
}
}
}