http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47352
--- Comment #4 from janus at gcc dot gnu.org 2011-01-21 23:01:23 UTC --- (In reply to comment #3) > Simple patch to avoid the ICE: The patch in comment #3 regtests without problems. However, I'm not sure if it's the best solution. Here is an alternative: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 169052) +++ gcc/fortran/resolve.c (working copy) @@ -167,6 +167,8 @@ resolve_procedure_interface (gfc_symbol *sym) sym->attr.function = ifc->attr.function; sym->attr.subroutine = ifc->attr.subroutine; gfc_copy_formal_args (sym, ifc); + if (sym->attr.function) + sym->result = sym; sym->attr.allocatable = ifc->attr.allocatable; sym->attr.pointer = ifc->attr.pointer;