[Bug fortran/59560] Resolution generic procedure of derived types fail

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 8 11:14:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59560

--- Comment #12 from janus at gcc dot gnu.org ---
(In reply to klaas_giesbertz from comment #11)
> Finally figured out how to make it work. I guess this is what the class(*)
> is useful for. Using class(*) I can simply overload Func and its resolution
> becomes dynamic. I consider the class(*) quite an overkill, but it works.

I don't think you need unlimited polymorphism, i.e. class(*), for what you're
trying to do. It should be enough to declare the 'other' argument as
'class(BaseClass)' in both cases.



More information about the Gcc-bugs mailing list