https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77903

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-10-08
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Note that gfortran 6.2.0 or 7.0 compiles also the following code

module one_module
  implicit none
  interface
    module function one()
    end function
  end interface
contains
  integer module function one()
    one = 1
  end function
end module

use one_module
print *,one()," is not ",1
end

but gives the "right" output

           1  is not            1

If the 'implicit none' is inserted in the function body of (see Steve's comment
in the fortran ml)

  interface
    module function one()
    end function
  end interface

gfortran gives the following errors

pr77903_db_2.f90:4:4:

     module function one()
    1
Error: Symbol 'one' at (1) has no IMPLICIT type
pr77903_db_2.f90:13:29:

pr77903_db_2.f90:10:20:

 submodule(one_module) one_submodule
                    2         
pr77903_db_2.f90:13:29:

   integer module function one()
                             1
Error: Procedure 'one' at (1) is already defined at (2)
pr77903_db_2.f90:18:4:

 use one_module
    1
Fatal Error: Can't open module file 'one_module.mod' for reading at (1): No
such file or directory
compilation terminated.

Note that I did not find the 'C1556 (R1527)' constraints mentioned at
https://gcc.gnu.org/ml/fortran/2016-10/msg00055.html.

Reply via email to