https://gcc.gnu.org/g:1414c232a40d27fbe54b75138a7fcbee682fd3f2
commit 1414c232a40d27fbe54b75138a7fcbee682fd3f2 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Fri Apr 18 18:37:57 2025 +0200 Correction régression deferred_character_34 Diff: --- gcc/fortran/trans-array.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index 8aae57118f50..ee329b82926e 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -4589,6 +4589,10 @@ done: { gcc_assert (info->shape != nullptr || ss->dimen == 1); tree type = gfc_typenode_for_spec (&ss_info->expr->ts); + if (ss_info->expr->ts.type == BT_CHARACTER + && ss_info->expr->ts.u.cl->length + && ss_info->expr->ts.u.cl->length->expr_type == EXPR_CONSTANT) + type = build_pointer_type (type); tree spacing = fold_convert_loc (input_location, gfc_array_index_type, TYPE_SIZE_UNIT (type));