https://gcc.gnu.org/g:5c362dc89e1f8720d98ebbc8d075843dd636a111
commit 5c362dc89e1f8720d98ebbc8d075843dd636a111 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Thu Apr 17 17:22:26 2025 +0200 Correction régression realloc_on_assign_16.f90 Diff: --- gcc/fortran/trans-array.cc | 10 ++-------- gcc/fortran/trans.h | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index 0b08cd184a38..d50b65f5b2d0 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -3643,8 +3643,8 @@ gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar, bool tmp_array = tree index = conv_array_index (se, ss, ss->dim[n], n, ar); gfc_array_info *info = &ss->info->data.array; - se->expr = build_array_ref_dim (ss, index, info->spacing0, info->offset, - tmp_array); + se->expr = build_array_ref_dim (ss, index, info->spacing[ss->dim[n]], + info->offset, tmp_array); } @@ -3922,12 +3922,6 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag, { gcc_assert (0 == ploop->order[0]); - info->spacing0 = gfc_conv_array_spacing (info->descriptor, 0); - /* Calculate the spacing of the innermost loop. Hopefully this will - allow the backend optimizers to do their stuff more effectively. - */ - info->spacing0 = gfc_evaluate_now (info->spacing0, pblock); - if (info->ref) { for (int i = ar->dimen - 1; i >= 0; i--) diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index fb0fb4ca342d..8673fd8cb423 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -197,8 +197,6 @@ typedef struct gfc_array_info /* To move some of the array index calculation out of the innermost loop. */ tree offset; - tree spacing0; - /* Holds the SS for a subscript. Indexed by actual dimension. */ struct gfc_ss *subscript[GFC_MAX_DIMENSIONS];