This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69603] [5/6 Regression] ICE: segfault with -fimplicit-none and proc_ptr_comp_24.f90
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Mar 2016 08:58:32 +0000
- Subject: [Bug fortran/69603] [5/6 Regression] ICE: segfault with -fimplicit-none and proc_ptr_comp_24.f90
- Auto-submitted: auto-generated
- References: <bug-69603-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69603
--- Comment #3 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Harald Anlauf from comment #2)
> Possible fix (for the crash), untested:
>
> Index: gcc/fortran/interface.c
> ===================================================================
> --- gcc/fortran/interface.c (revision 234170)
> +++ gcc/fortran/interface.c (working copy)
> @@ -2006,7 +2006,7 @@
> }
>
> ppc = gfc_get_proc_ptr_comp (actual);
> - if (ppc)
> + if (ppc && ppc->ts.interface)
> {
> if (!gfc_compare_interfaces (formal, ppc->ts.interface, ppc->name, 0,
> 1,
> err, sizeof(err), NULL, NULL))
The patch regtests ok on i686-pc-linux-gnu.