https://gcc.gnu.org/g:a1653090637677ecf5979fc48c435238f9e05d8a
commit a1653090637677ecf5979fc48c435238f9e05d8a 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 3218d2b66bf6..d99c70c1afb9 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -4708,6 +4708,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));