[Bug fortran/59560] Resolution generic procedure of derived types fail
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 19 16:44:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59560
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to klaas_giesbertz from comment #0)
> This code compiles and runs correctly with gcc4.7.3, but gcc4.8.2 gives the
> following compile error:
>
> Test1.f08:58.13:
>
> procedure :: Func
> 1
> Error: Argument mismatch for the overriding procedure 'func' at (1):
> Type/rank mismatch in argument 'other'
For your first example, I get this error with all version from 4.6 to trunk
(with slight variations in the wording). Are you sure the code you posted is
what you compiled with 4.7?
> I actually do not even know if this code is supposed to compile, since it is
> not clear to me if such kind of overloading is allowed by the fortran
> standard.
I think the error is correct. The Fortran standard does not allow this.
More information about the Gcc-bugs
mailing list