https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97122
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #3)
> Nagfor responds to the test case with "Error: pr97122.f90, line 14: Type T
> has final subroutines but is not defined in the specification part of a
> module"
>
> F2018:
> "C787(R753) A final-subroutine-name shall be the name of a module procedure
> with exactly one dummy argument."
>
> Since, of necessity, the argument is declared to be of the derived type with
> the final binding, the gfortran and nagfor errors are correct IMHO. ifort
> compiles it without complaint.
>
> I have marked this as "waiting" pending a contrary interpretation.
>
> Cheers
>
> Paul
Hi Paul,
I don't see how C787 applies.
SUBROUTINE p(arg)
TYPE(t), INTENT(INOUT) :: arg
END SUBROUTINE p
p() has exactly one argument. If I read F2018 correctly (which is almost
always questionable), a module procedure can appear in a submodule.