diff options
author | Mikael Morin <morin-mikael@orange.fr> | 2025-08-05 14:58:02 +0200 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2025-08-05 22:35:07 +0200 |
commit | 0634bd56978478c567a29841b6f99ac7050764e6 (patch) | |
tree | cb3b37e1fa51010b38fd9c260a66d80a4d80ae01 | |
parent | 8d2e44fa19959e8452d500f264f4c96e13ec3617 (diff) | |
download | gcc-0634bd56978478c567a29841b6f99ac7050764e6.zip gcc-0634bd56978478c567a29841b6f99ac7050764e6.tar.gz gcc-0634bd56978478c567a29841b6f99ac7050764e6.tar.bz2 |
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.
-rw-r--r-- | gcc/fortran/trans-array.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index f4a7a0c..7e6437b 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 |