https://gcc.gnu.org/g:0634bd56978478c567a29841b6f99ac7050764e6

commit r16-3020-g0634bd56978478c567a29841b6f99ac7050764e6
Author: Mikael Morin <morin-mik...@orange.fr>
Date:   Tue Aug 5 14:58:02 2025 +0200

    fortran: Remove array bound update after constructor expansion
    
    The array constructor expansion extends the size of the array
    dynamically, and sets the upper bound appropriately every time it
    does.  There is no need to do it again at the end of expansion.
    
    gcc/fortran/ChangeLog:
    
            * trans-array.cc (trans_array_constructor): Remove the update of
            the array descriptor upper bound after array constructor
            expansion.

Diff:
---
 gcc/fortran/trans-array.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index f4a7a0c065cb..7e6437bbdf7e 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -3105,7 +3105,6 @@ trans_array_constructor (gfc_ss * ss, locus * where)
                             gfc_array_index_type,
                             offsetvar, gfc_index_one_node);
       tmp = gfc_evaluate_now (tmp, &outer_loop->pre);
-      gfc_conv_descriptor_ubound_set (&loop->pre, desc, gfc_rank_cst[0], tmp);
       if (*loop_ubound0 && VAR_P (*loop_ubound0))
        gfc_add_modify (&outer_loop->pre, *loop_ubound0, tmp);
       else

Reply via email to