https://gcc.gnu.org/g:2bad3abe5f4c1c165f0f0e9531ee73108f13a20e
commit 2bad3abe5f4c1c165f0f0e9531ee73108f13a20e 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 1d76b86d0040..8350173648a5 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -3524,8 +3524,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); } @@ -3803,12 +3803,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 7edf8192065a..fb728247f058 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -201,8 +201,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];