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

--- Comment #7 from kargl at gcc dot gnu.org ---
(In reply to Gerhard Steinmetz from comment #0)
> With a missing parameter attribute, or value not initialized :
> 
> $ cat z1.f90
> program p
>    integer :: i = 0
>    integer :: z(2)
>    data z /2*i/
> end
> 
> $ gfortran-6 z1.f90
> f951: internal compiler error: free_expr0(): Bad expr type

Index: decl.c
===================================================================
--- decl.c      (revision 237855)
+++ decl.c      (working copy)
@@ -395,6 +395,7 @@ match_data_constant (gfc_expr **result)
     {
       gfc_error ("Symbol %qs must be a PARAMETER in DATA statement at %C",
                 name);
+      *result = NULL;
       return MATCH_ERROR;
     }
   else if (dt_sym && gfc_fl_struct (dt_sym->attr.flavor))

Reply via email to