https://gcc.gnu.org/g:76bee02bf2873e88b15e0cf74722b8985098ed4f
commit 76bee02bf2873e88b15e0cf74722b8985098ed4f Author: Mikael Morin <mik...@gcc.gnu.org> Date: Mon May 5 20:22:15 2025 +0200 Correction régression oldstyle_1 Diff: --- gcc/fortran/trans-array.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index f75747038219..9a91fa64c2a6 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -6058,6 +6058,14 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr) else tmp1 = gfc_conv_mpz_to_tree (c->offset, gfc_index_integer_kind); + if (min_index) + { + tmp1 = fold_build2_loc (input_location, PLUS_EXPR, + TREE_TYPE (tmp1), tmp1, min_index); + tmp2 = fold_build2_loc (input_location, PLUS_EXPR, + TREE_TYPE (tmp2), tmp2, min_index); + } + range = fold_build2 (RANGE_EXPR, gfc_array_index_type, tmp1, tmp2); mpz_clear (maxval); }