In Intel’s Fortran compiler documentation, on the MODULE SUBROUTINE page, there is the following example code snippet:
submodule (M) A
contains
real module subroutine FOO (arg)
type(tt), intent(in) :: arg
arg%r =1
end subroutine FOO
end submodule A
Could be my own ignorance, but I thought only function
s could have types.
I wonder if this is a copy-paste-find-replace from other similar examples that have nearly identical code snippets containing real module function
s like separate module procedures.
And I just noticed arg
is intent(in)
but one of its members is assigned in the subroutine.