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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org
           Priority|P3                          |P4

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to José Rui Faustino de Sousa from comment #1)
> On further investigation the ICE is not generated by the extra parenthesis,
> but by the use of the lbound intrinsic.

Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c      (revision 280157)
+++ gcc/fortran/simplify.c      (working copy)
@@ -4019,7 +4023,7 @@ simplify_bound_dim (gfc_expr *array, gfc_expr *kind, i
       || (coarray && d == as->rank + as->corank
          && (!upper || flag_coarray == GFC_FCOARRAY_SINGLE)))
     {
-      if (as->lower[d-1]->expr_type == EXPR_CONSTANT)
+      if (as->lower[d-1] && as->lower[d-1]->expr_type == EXPR_CONSTANT)
        {
          gfc_free_expr (result);
          return gfc_copy_expr (as->lower[d-1]);

Reply via email to