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

--- Comment #3 from anlauf at gcc dot gnu.org ---
Potential patch:

diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc
index bbdb5b392fc..9bec299f160 100644
--- a/gcc/fortran/array.cc
+++ b/gcc/fortran/array.cc
@@ -1205,6 +1205,10 @@ walk_array_constructor (gfc_typespec *ts,
gfc_constructor_base head)
   for (c = gfc_constructor_first (head); c; c = gfc_constructor_next (c))
     {
       e = c->expr;
+
+      if (e->expr_type == EXPR_OP)
+       gfc_simplify_expr (e, 0);
+
       if (e->expr_type == EXPR_ARRAY && e->ts.type == BT_UNKNOWN
          && !e->ref && e->value.constructor)
        {

This seems to fix pr107219, too.

Reply via email to