[Bug fortran/47352] [F03] ICE with proc-pointers in generic procedures

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jan 22 20:57:00 GMT 2011


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

--- Comment #5 from janus at gcc dot gnu.org 2011-01-22 17:48:04 UTC ---
(In reply to comment #4)
> 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;


This one also regtests cleanly, and I think it is preferable over the previous
one.



More information about the Gcc-bugs mailing list