]> gcc.gnu.org Git - gcc.git/commitdiff
testsuite/lib/gfortran.exp: Add -I for ISO*.h [PR101305, PR101660]
authorTobias Burnus <tobias@codesourcery.com>
Mon, 9 Aug 2021 10:35:23 +0000 (12:35 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 9 Aug 2021 10:35:23 +0000 (12:35 +0200)
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.

20 files changed:
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_10.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_11.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_12.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_15.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_17.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_18.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_3.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_7.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_8.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_9.c
gcc/testsuite/gfortran.dg/PR94327.c
gcc/testsuite/gfortran.dg/PR94331.c
gcc/testsuite/gfortran.dg/bind_c_array_params_3_aux.c
gcc/testsuite/gfortran.dg/iso_fortran_binding_uint8_array_driver.c
gcc/testsuite/gfortran.dg/pr93524.c
gcc/testsuite/lib/gfortran.exp

index bb56ca0e04bc22fffbd102548f24346d0efa345f..d0d036ae779cef3f1b17c37f6fca788ef221bfd1 100644 (file)
@@ -1,6 +1,6 @@
 /* Test F2008 18.5: ISO_Fortran_binding.h functions.  */
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
index c3954e4e782c7db81a477bf3e4197047cc4660e3..91222fff481348dddf66e40607112eeda10a9d05 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Contributed by Reinhold Bader  <Bader@lrz.de> */
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdbool.h>
index c2d4e11c9d32dacf5b0b563e30aad295e7546e41..e013011a38070759c8503e4c499190aeb1ffa8b4 100644 (file)
@@ -5,7 +5,7 @@ Contributed by Reinhold Bader  <Bader@lrz.de>#include <stdio.h> */
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 typedef struct
 {
index 078c5de87d001a0efc567f145e38b04f91df95f4..0a41576aa5ef994c73291d896ae06062326e4922 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 /* Contributed by Reinhold Bader  <Bader@lrz.de>  */
 
index 622f2de6ff3e4817c5b9e2c1f41529ffbb33e12e..fc70da4d133d49f03deb12f39cf0459f9e5a8264 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 // Prototype for Fortran functions
 extern void Fsub(CFI_cdesc_t *);
index 50b92ec069c931fbbcdce54451660832c5e1dffe..915b6e7d568e21fd2b6b2bdba8c1cfa77c143bcd 100644 (file)
@@ -1,6 +1,6 @@
 /* Test the fix for PR92142. */
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 #include <stdlib.h>
 
index b0893cc15e8490ddbc70ea1912d08ac4b0fee2d3..fa75268cd26c8a1e0e7434ab784fcddc5170587d 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <stdio.h>
 #include <assert.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 void Csub(const CFI_cdesc_t *, size_t, CFI_index_t invalid);
 
index ef40134fa3c27ef6552241920837925fd6705095..5a3952ca92e2411d05c3e4e9d9c368bd1a169524 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 
 extern int do_loop(CFI_cdesc_t* array);
index 9f35b0dcb800fd756b566c98b6812a9377eb91a6..33d1bc3c7e3d05e288769d9ec33addd5cca30f9b 100644 (file)
@@ -1,4 +1,4 @@
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 #include <stdio.h>
 #include <stdlib.h>
 
index 116f548ad99e311b9911317dfc5e9e68a7ba7adb..b18a899ba26df6655b61d65e4fbcca1787ce62e8 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 typedef struct {
   int i;
index 704b27cb28a41eb3dbcf38b3d642d814b76076dd..c7981c5847ac190be0604ed8a6cee5d82068f9f6 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 #define DEBUG 0
 
index 26b4ab5a015a1045d7c601363ba22857b8a33906..8162451ca99e91447057436d9d47cd48fd73e3b8 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Contributed by Reinhold Bader  <Bader@lrz.de> */
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
index a0d1bdc8e83efe5e53c7678e5ae4d02898ea481e..d3dce3a34729a7b5e3207e7567b490f5becfa1ae 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Contributed by Reinhold Bader  <Bader@lrz.de> */
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 #include <stdio.h>
 
 float Cxgl[] = { 1.1, 2.3, 5.1, 4.2 };
index 632604f5ee81db4dd4643b549efe02461c72653c..cb17077864228418afb2ad432a97ebc499da736e 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Contributed by Gilles Gouaillardet  <gilles@rist.or.jp> */
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 #include <stdlib.h>
 
 int cdesc_c(CFI_cdesc_t* x, long *expected)
index 4ce408dbc39d3563385b936052bb8245e003083c..9d226811f583e602e230c46ead93d1ca4516f299 100644 (file)
@@ -4,7 +4,7 @@
 #include <stdbool.h>
 #include <stdlib.h>
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 bool c_vrfy (const CFI_cdesc_t *restrict);
 
index 2fbfe0e714406889e65846dfaa299673466f43f3..df571c7583c7f432b385e9467de3ab393db00f60 100644 (file)
@@ -4,7 +4,7 @@
 #include <stdbool.h>
 #include <stdlib.h>
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 bool c_vrfy (const CFI_cdesc_t *restrict);
 
index 5176d8b5741094bf69aff308b76789fb8fde2810..459418539284d5808a0515799b618d4d2de91838 100644 (file)
@@ -5,7 +5,7 @@
 #include <errno.h>
 #include <stdio.h>
 
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 void arr_set_c(CFI_cdesc_t*);
 
index bfd567bba95fa3c1f1ee8f89cf78bd8abb057ccc..9c2b5fb721bfcd33423df13548a324c0970300db 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <inttypes.h>
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 extern void fsub(CFI_cdesc_t *);
 
index ba40d007bfb16a8cc5c1b462a5a8ea7eade3d064..8a6c06677f28f2ad344d54f37c6c86ac37e45c23 100644 (file)
@@ -2,7 +2,7 @@
    sm incorrectly for dimensions > 2.  */
 
 #include <stdlib.h>  // For size_t
-#include "ISO_Fortran_binding.h"
+#include <ISO_Fortran_binding.h>
 
 void my_fortran_sub_1 (CFI_cdesc_t *dv); 
 void my_fortran_sub_2 (CFI_cdesc_t *dv); 
index 1e7da1110bc7a2a9dcc335bea4207238ea260714..cae6738b4b8f82f0c10b20dfe5b180bb59d0a46c 100644 (file)
@@ -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]]]
            }
        }
     }
This page took 0.089584 seconds and 5 git commands to generate.