This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, libgomp] libgomp.fortran/fortran.exp - add -fintrinsic-modules-path ${blddir}


Hi!

Reopening this oldie:

On Wed, 19 Dec 2012 16:38:41 +0100, Tobias Burnus <burnus@net-b.de> wrote:
> 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.

> 2012-12-19  Tobias Burnus  <burnus@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"

Doing build-tree testing, this results in several test becoming
UNSUPPORTED (instead of PASS), in particular those that do things like
Âdg-require-effective-target tls_runtime or Âdg-do run { target
vect_simd_clones }Â, and we then run into:

    spawn [...]/build/gcc/xgcc -B[...]/build/gcc/ -B[...]/build/x86_64-unknown-linux-gnu/./libgomp/ -B[...]/build/x86_64-unknown-linux-gnu/./libgomp/.libs -I[...]/build/x86_64-unknown-linux-gnu/./libgomp -I[...]/source/libgomp/testsuite/.. -fmessage-length=0 -fno-diagnostics-show-caret -fdiagnostics-color=never -fopenmp -fintrinsic-modules-path=[...]/build/x86_64-unknown-linux-gnu/./libgomp -B[...]/build/x86_64-unknown-linux-gnu/./libgomp/../libquadmath/.libs/ -O2 -mavx -B[...]/build/x86_64-unknown-linux-gnu/./libgomp/../libgfortran/.libs -c -o avx32186.o avx32186.c
    cc1: warning: command line option '-fintrinsic-modules-path=[...]/build/x86_64-unknown-linux-gnu/./libgomp' is valid for Fortran but not for C
    output is:
    cc1: warning: command line option '-fintrinsic-modules-path=[...]/build/x86_64-unknown-linux-gnu/./libgomp' is valid for Fortran but not for C
    
    UNSUPPORTED: libgomp.fortran/declare-simd-1.f90
    UNSUPPORTED: libgomp.fortran/declare-simd-2.f90

Is there any obvious cure for this?  (Obviously, reverting that change
isn't the solution, because then libgomp.fortran/use_intrinsic_1.f90
FAILs.)


I think this issue also is part of what has been reported in
<http://gcc.gnu.org/PR55884>, but not yet properly addressed.


GrÃÃe,
 Thomas

Attachment: pgpqM_0UvCTFn.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]