https://gcc.gnu.org/g:2490a71c523e0961876353486c3cce679cff8e83

commit 2490a71c523e0961876353486c3cce679cff8e83
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Thu Jan 16 14:51:42 2025 +0100

    Factorisation shift descriptor

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

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 52d125969980..5783e9a0af95 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -1240,7 +1240,6 @@ gfc_conv_intrinsic_to_class (gfc_se *parmse, gfc_expr *e,
   tree ctree;
   tree var;
   tree tmp;
-  int dim;
   bool unlimited_poly;
 
   unlimited_poly = class_ts.type == BT_CLASS
@@ -1307,11 +1306,7 @@ gfc_conv_intrinsic_to_class (gfc_se *parmse, gfc_expr *e,
          /* Array references with vector subscripts and non-variable 
expressions
             need be converted to a one-based descriptor.  */
          if (e->expr_type != EXPR_VARIABLE)
-           {
-             for (dim = 0; dim < e->rank; ++dim)
-               gfc_conv_shift_descriptor_lbound (&parmse->pre, parmse->expr,
-                                                 dim, gfc_index_one_node);
-           }
+           gfc_conv_shift_descriptor (&parmse->pre, parmse->expr, e->rank);
 
          if (class_ts.u.derived->components->as->rank != e->rank)
            {

Reply via email to