[Bug fortran/42418] PROCEDURE: Rejects interface which is both specific and generic procedure

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jul 21 17:10:00 GMT 2012


--- Comment #7 from janus at gcc dot gnu.org 2012-07-21 17:10:32 UTC ---
(In reply to comment #6)
> However, I wonder whether this whole generic check does not come to early. If
> the generic interface is declared after the PROCEDURE statement, it will not be
> triggered. It should probably be moved to resolve.c

Along this line:

module mod
  procedure(gen) :: f
  interface gen
    module procedure spec
  end interface gen
  subroutine spec()
  end subroutine
end module

This is rejected with:

  procedure(gen) :: f
Error: Interface 'gen' of procedure 'f' at (1) must be explicit

I'm not sure if this error message is correct. In any case, it is accepted if
'spec' is used as an interface in the PROCEDURE declaration (which seems

More information about the Gcc-bugs mailing list