[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction régression class_assign_3
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 14:55:38 GMT 2025
https://gcc.gnu.org/g:96fc3ec7b778fe74e8c275a471a2f481387ebdb5
commit 96fc3ec7b778fe74e8c275a471a2f481387ebdb5
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Tue Apr 15 16:51:23 2025 +0200
Correction régression class_assign_3
Diff:
---
gcc/fortran/trans-types.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc
index b1bb2ba32728..32938a69cf65 100644
--- a/gcc/fortran/trans-types.cc
+++ b/gcc/fortran/trans-types.cc
@@ -2209,8 +2209,11 @@ gfc_get_array_type_bounds (tree etype, int dimen, int codimen, tree * lbound,
else
{
stride = gfc_index_one_node;
- spacing = fold_convert_loc (input_location, gfc_array_index_type,
- TYPE_SIZE_UNIT (etype));
+ if (dimen == 0)
+ spacing = NULL_TREE;
+ else
+ spacing = fold_convert_loc (input_location, gfc_array_index_type,
+ TYPE_SIZE_UNIT (etype));
}
for (n = 0; n < dimen + codimen; n++)
{
More information about the Gcc-cvs
mailing list