This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42418] PROCEDURE: Rejects interface which is both specific and generic procedure
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 Jul 2012 17:10:32 +0000
- Subject: [Bug fortran/42418] PROCEDURE: Rejects interface which is both specific and generic procedure
- Auto-submitted: auto-generated
- References: <bug-42418-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42418
--- 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
contains
subroutine spec()
end subroutine
end module
This is rejected with:
procedure(gen) :: f
1
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
inconsistent).