(j3.2006) Submodule/module interface mismatch: is thisstandard-conforming?

Van Snyder van.snyder
Sat Oct 8 04:19:06 EDT 2016


On Sat, 2016-10-08 at 16:21 +0900, Malcolm Cohen wrote:
> The interface body by itself is conforming; if you read the IMPLICIT 
> statement, it says that the implicit mapping in an interface body with
> no IMPLICIT statement is the usual Fortran REAL(A-H,O-Z) INTEGER(I-N),
> but the later separate module procedure has different characteristics,
> so that is not conforming.

We provided different host association rules for interface bodies for
external and dummy procedures on one hand, and module procedure
interface bodies on the other hand.

Did we discuss whether different rules, different in the same way as for
host association, ought to apply for IMPLICIT?  It would seem like a
reasonable thing to do, eventually, perhaps even if we already pondered
the proposition and rejected it.

Should the implicit mapping be regulated by the IMPORT statement?

Since submodules are just now becoming available from processors, and
only a few users are using them, it would seem to be better to make a
change sooner rather than later.

In Damian's example:

module one_module
  implicit none
  interface
    module function one()
    end function
  end interface
end module

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

the result type declared in the interface body for "one" would be "no
mapping" instead of default real.





More information about the J3 mailing list