https://gcc.gnu.org/g:4128faf3ad0d5953a26b0dce85fa603e0104419b
commit 4128faf3ad0d5953a26b0dce85fa603e0104419b Author: Mikael Morin <mik...@gcc.gnu.org> Date: Thu Feb 13 20:26:47 2025 +0100 Factorisation set_descriptor_dimension Correction typo Diff: --- gcc/fortran/trans-array.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index eccc32cc1a41..2f33dae6ad01 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -1904,6 +1904,9 @@ set_bounds_update_offset (stmtblock_t *block, tree desc, int dim, gfc_conv_descriptor_stride_set (block, desc, gfc_rank_cst[dim], stride); + if (!offset && !next_stride) + return; + /* Update offset. */ tree tmp = fold_build2_loc (input_location, MULT_EXPR, gfc_array_index_type, lbound_diff, stride); @@ -3650,13 +3653,8 @@ set_temporary_descriptor (stmtblock_t *block, tree desc, tree class_src, for (n = 0; n < rank; n++) { /* Store the stride and bound components in the descriptor. */ - gfc_conv_descriptor_stride_set (block, desc, gfc_rank_cst[n], - stride[n]); - - gfc_conv_descriptor_lbound_set (block, desc, gfc_rank_cst[n], - gfc_index_zero_node); - - gfc_conv_descriptor_ubound_set (block, desc, gfc_rank_cst[n], ubound[n]); + set_descriptor_dimension (block, desc, n, gfc_index_zero_node, ubound[n], + stride[n], nullptr, nullptr); } }