This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47352] [F03] ICE with proc-pointers in generic procedures
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Jan 2011 17:48:06 +0000
- Subject: [Bug fortran/47352] [F03] ICE with proc-pointers in generic procedures
- Auto-submitted: auto-generated
- References: <bug-47352-4@http.gcc.gnu.org/bugzilla/>
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.