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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-01-22
                 CC|                            |kargl at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from kargl at gcc dot gnu.org ---
This stops the ICE, but does not fix  mishandling of
of the kind inquiry.  Watch copy-n-paster whitespace
issues.

Index: /usr/home/sgk/gcc/gccx/gcc/fortran/decl.c
===================================================================
--- /usr/home/sgk/gcc/gccx/gcc/fortran/decl.c   (revision 280157)
+++ /usr/home/sgk/gcc/gccx/gcc/fortran/decl.c   (working copy)
@@ -423,7 +423,8 @@ match_data_constant (gfc_expr **result)
         data-pointer-initialization compatible (7.5.4.6) with the initial
         data target; the data statement object is initially associated
         with the target.  */
-      if ((*result)->symtree->n.sym->attr.save
+      if ((*result)->symtree != NULL
+         && (*result)->symtree->n.sym->attr.save
          && (*result)->symtree->n.sym->attr.target)
        return m;
       gfc_free_expr (*result);

Reply via email to