[Bug fortran/84957] [8 Regression] ICE in gfc_sym_type, at fortran/trans-types.c:2255

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Tue Mar 20 22:32:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84957

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gmx dot de

--- Comment #2 from Harald Anlauf <anlauf at gmx dot de> ---
ICE is due to null pointer dereference, fixed by:

Index: gcc/fortran/trans-types.c
===================================================================
--- gcc/fortran/trans-types.c   (revision 258658)
+++ gcc/fortran/trans-types.c   (working copy)
@@ -2252,6 +2252,7 @@
       && sym->ts.type == BT_CHARACTER
       && sym->ts.u.cl->backend_decl == NULL_TREE
       && sym->ns->proc_name
+      && sym->ns->proc_name->ts.u.cl
       && sym->ns->proc_name->ts.u.cl->backend_decl != NULL_TREE)
     sym->ts.u.cl->backend_decl = sym->ns->proc_name->ts.u.cl->backend_decl;


More information about the Gcc-bugs mailing list