https://gcc.gnu.org/g:983878efe9fb100269cb959d17152fb1db89421d
commit 983878efe9fb100269cb959d17152fb1db89421d 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 0c07de4bd18a..15d9f629feaf 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -2206,8 +2206,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++) {