https://gcc.gnu.org/g:b58faac506d8754289e9f3af3b565b197210cc7f
commit b58faac506d8754289e9f3af3b565b197210cc7f Author: Mikael Morin <mik...@gcc.gnu.org> Date: Tue Apr 29 15:42:48 2025 +0200 Correction régression alloc_comp_result_1 Diff: --- gcc/fortran/trans-array.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index 1db6b69d8df3..d2380ad37a6b 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -8888,6 +8888,9 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, tree dest, { /* Otherwise use the TYPE_DOMAIN information. */ 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 = fold_convert (gfc_array_index_type, tmp); }