[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction régression alloc_comp_result_1

Mikael Morin mikael@gcc.gnu.org
Fri Jun 13 14:59:59 GMT 2025


https://gcc.gnu.org/g:2fd5f150420afbd683bbdaa3d9bae36af93378bd

commit 2fd5f150420afbd683bbdaa3d9bae36af93378bd
Author: Mikael Morin <mikael@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 e88a64767f14..84df0caacedc 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -8769,6 +8769,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);
 	}


More information about the Gcc-cvs mailing list