2023-03-21 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/109206
* trans-array.cc (gfc_trans_array_constructor_value): Correct
incorrect setting of typespec.
tree shadow_loopvar = NULL_TREE;
gfc_saved_var saved_loopvar;
+ ts.type = BT_UNKNOWN;
mpz_init (size);
for (c = gfc_constructor_first (base); c; c = gfc_constructor_next (c))
{
gfc_add_modify (&body, *offsetvar, *poffset);
*poffset = *offsetvar;
}
- ts = c->expr->ts;
+
+ if (!c->iterator)
+ ts = c->expr->ts;
}
/* The frontend should already have done any expansions