https://gcc.gnu.org/g:eb19c87fb4d0ad56aa356661afda0f21e5a19092
commit eb19c87fb4d0ad56aa356661afda0f21e5a19092 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Fri Apr 11 10:40:32 2025 +0200 Correction ICE PR49268.f90 Diff: --- gcc/fortran/trans-decl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc index 9b3e5083eed2..dfcee60cd2be 100644 --- a/gcc/fortran/trans-decl.cc +++ b/gcc/fortran/trans-decl.cc @@ -1070,7 +1070,7 @@ update_type_bounds (tree type, tree lbound[GFC_MAX_DIMENSIONS], } if (current_ubound != NULL_TREE) { - GFC_TYPE_ARRAY_UBOUND (type, dim) = current_ubound; + GFC_TYPE_ARRAY_UBOUND (root_type, dim) = current_ubound; if (current_ubound && VAR_P (current_ubound) && DECL_ARTIFICIAL (current_ubound) @@ -1085,7 +1085,7 @@ update_type_bounds (tree type, tree lbound[GFC_MAX_DIMENSIONS], tree current_spacing = spacing[dim]; if (current_spacing != NULL_TREE) { - GFC_TYPE_ARRAY_SPACING (type, dim) = current_spacing; + GFC_TYPE_ARRAY_SPACING (root_type, dim) = current_spacing; if (current_spacing && VAR_P (current_spacing) && DECL_ARTIFICIAL (current_spacing)