[Bug fortran/47352] [F03] ICE with proc-pointers in generic procedures
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 9 22:21:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47352
--- Comment #6 from janus at gcc dot gnu.org 2011-02-09 22:00:21 UTC ---
Here is yet another variant:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 169985)
+++ gcc/fortran/resolve.c (working copy)
@@ -160,7 +160,10 @@ resolve_procedure_interface (gfc_symbol *sym)
resolve_intrinsic (ifc, &ifc->declared_at);
if (ifc->result)
- sym->ts = ifc->result->ts;
+ {
+ sym->ts = ifc->result->ts;
+ sym->result = sym;
+ }
else
sym->ts = ifc->ts;
sym->ts.interface = ifc;
This has basically the same effect as the one in comment #4, but it'a a bit
clearer.
I'd even say it's pretty much obvious in this form. Will commit after
regtesting.
More information about the Gcc-bugs
mailing list