The attached patch adds
   -fintrinsic-modules-path ${blddir}
otherwise, the compiler might have trouble finding the libraries using "use, INTRINSIC :: omp_lib". Without "intrinsic" it searches the "-I" directories.

(The compiler supports multiple -fintrinsic-modules-path, cf. gfc_add_intrinsic_modules_path; however, the only physically existing intrinsic .mod files are those of libgomp. ISO_C_binding and ISO_Fortran_env do only virtually exist in the compiler.)

Tested on x86-64-gnu-linux.
OK?

Tobias
2012-12-19  Tobias Burnus  <bur...@net-b.de>

	* testsuite/libgomp.fortran/fortran.exp: Set
	-fintrinsic-modules-path.

diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index 5fa42f4..68440d18 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -14,6 +14,7 @@ set quadmath_library_path "../libquadmath/.libs"
 dg-init
 
 if { $blddir != "" } {
+    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path ${blddir}"
     # Look for a static libgfortran first.
     if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
         set lang_test_file "${lang_library_path}/libgfortran.a"

Reply via email to