https://gcc.gnu.org/g:ae89415f53359a20b870788662a19e438d2323db

commit ae89415f53359a20b870788662a19e438d2323db
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Fri Jul 18 14:45:07 2025 +0200

    Factorisation gfc_conv_shift_descriptor

Diff:
---
 gcc/fortran/trans-stmt.cc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/gcc/fortran/trans-stmt.cc b/gcc/fortran/trans-stmt.cc
index c359637355f7..8fedda1159d6 100644
--- a/gcc/fortran/trans-stmt.cc
+++ b/gcc/fortran/trans-stmt.cc
@@ -2172,16 +2172,12 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block 
*block)
       if ((!sym->assoc->variable && !cst_array_ctor)
          || !whole_array)
        {
-         int dim;
-
          if (whole_array)
            gfc_add_modify (&se.pre, desc, se.expr);
 
          /* The generated descriptor has lower bound zero (as array
             temporary), shift bounds so we get lower bounds of 1.  */
-         for (dim = 0; dim < e->rank; ++dim)
-           gfc_conv_shift_descriptor_lbound (&se.pre, desc,
-                                             dim, gfc_index_one_node);
+         gfc_conv_shift_descriptor (&se.pre, desc, e->rank);
        }
 
       /* If this is a subreference array pointer associate name use the

Reply via email to