Correction régression associate_47.f90

This commit is contained in:
Mikael Morin 2025-10-15 21:29:50 +02:00
parent 02a1c10ade
commit f9a83a99eb
2 changed files with 9 additions and 9 deletions

View File

@ -8350,14 +8350,13 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr)
}
}
if (expr->ts.type == BT_CHARACTER
&& VAR_P (TYPE_SIZE_UNIT (gfc_get_element_type (TREE_TYPE (parm)))))
{
tree elem_len = TYPE_SIZE_UNIT (gfc_get_element_type (TREE_TYPE (parm)));
if (expr->ts.type == BT_CHARACTER)
if (tree elt_type = gfc_get_element_type (TREE_TYPE (parm)))
if (tree elem_len = TYPE_SIZE_UNIT (elt_type))
if (VAR_P (elem_len))
gfc_add_modify (&loop.pre, elem_len,
fold_convert (TREE_TYPE (elem_len),
gfc_get_array_span (desc, expr)));
}
if (info
&& info->ref

View File

@ -1401,7 +1401,8 @@ gfc_typenode_for_spec (gfc_typespec * spec, int codim)
break;
case BT_CHARACTER:
basetype = gfc_get_character_type (spec->kind, spec->u.cl);
basetype = gfc_get_character_type (spec->kind,
spec->deferred ? nullptr : spec->u.cl);
break;
case BT_HOLLERITH: