https://gcc.gnu.org/g:09507e00493ad0e8659065590085f0b3384f275a

commit 09507e00493ad0e8659065590085f0b3384f275a
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 a1a5ac3d3c99..c0d9622b4ee1 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -1072,7 +1072,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)
@@ -1087,7 +1087,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)

Reply via email to