[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction régression dec_type_print_2
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 15:07:13 GMT 2025
https://gcc.gnu.org/g:11c26087c05138365952a9dd9043cbef99888d60
commit 11c26087c05138365952a9dd9043cbef99888d60
Author: Mikael Morin <mikael@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 f9bdcd395eba..d8d7aa9b97c1 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -8935,7 +8935,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);
}
More information about the Gcc-cvs
mailing list