https://gcc.gnu.org/g:2b9a79bb35a346266a5400417de434a72e8b7616
commit 2b9a79bb35a346266a5400417de434a72e8b7616 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Mon May 19 21:02:06 2025 +0200 Correction régression dec_type_print_2 Diff: --- gcc/fortran/trans-array.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index a738fb71daa3..5c6e4dacd904 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -9054,7 +9054,12 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, tree dest, tmp = array_type_nelts_minus_one (decl_type); if (error_operand_p (tmp) && GFC_ARRAY_TYPE_P (decl_type)) - tmp = GFC_TYPE_ARRAY_SIZE (decl_type); + { + tmp = GFC_TYPE_ARRAY_SIZE (decl_type); + tmp = fold_build2_loc (input_location, MINUS_EXPR, + gfc_array_index_type, tmp, + gfc_index_one_node); + } tmp = fold_convert (gfc_array_index_type, tmp); }