https://gcc.gnu.org/g:8cf6bcb56e19fcbee3e729809aca272627c59046
commit 8cf6bcb56e19fcbee3e729809aca272627c59046 Author: Mikael Morin <mik...@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 e4b5a9b03b83..1e8148b0d91e 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++) {