awarzynski added a comment.

In D97080#2613628 <https://reviews.llvm.org/D97080#2613628>, @awarzynski wrote:

> **Question**: What are the semantics for this flag in `gfortran`? Is the path 
> specified with `-fintrinsics-module-path` _prepended_ or _appended_ to the 
> default search path?

I believe that it is _prepended_. Take this dummy module:

  module ieee_arithmetic
  type::ieee_round_type
  integer(1),private::mode=0_2
  end type
  end

Compile it with e.g. `flang-new`:

  flang-new -fc1 -fsyntax-only dummy-module.f90

Next, take this Fortran file:

  program test
    use ieee_arithmetic
    implicit none
    real(kind=4) :: x1
    if (.not. ieee_support_nan(x1)) STOP 20
  end program test

And try compiling it with `gfortran`:

  mv ieee_arithmetic.mod tools/flang/
  gfortran -fintrinsic-modules-path tools/flang/ test.f90
  test.f90:2:6:
  
     use ieee_arithmetic
        1
  Fatal Error: File ‘ieee_arithmetic.mod’ opened at (1) is not a GNU Fortran 
module file
  compilation terminated.

So `gfortran` did look in `tools/flang` first, i.e. the path specified with 
`-fintrinsic-modules-path`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97080/new/

https://reviews.llvm.org/D97080

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to