https://gcc.gnu.org/g:ba2747c8b8bf865d180cab7583c8b4a63a59f316
commit ba2747c8b8bf865d180cab7583c8b4a63a59f316 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Sat Aug 16 22:33:27 2025 +0200 Correction régression class_allocate_22 Diff: --- gcc/fortran/trans-descriptor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc index e6a33672140d..0da148c188e0 100644 --- a/gcc/fortran/trans-descriptor.cc +++ b/gcc/fortran/trans-descriptor.cc @@ -2789,6 +2789,7 @@ gfc_descriptor_init_count (tree descriptor, int rank, int corank, } } conv_lbound = se.expr; + conv_lbound = gfc_evaluate_now (conv_lbound, pblock); /* Set upper bound. */ gfc_init_se (&se, NULL); @@ -2825,6 +2826,7 @@ gfc_descriptor_init_count (tree descriptor, int rank, int corank, se.expr = gfc_evaluate_now (se.expr, pblock); } conv_ubound = se.expr; + conv_ubound = gfc_evaluate_now (conv_ubound, pblock); set_dimension_fields (descriptor_block, descriptor, gfc_rank_cst[n], conv_lbound, conv_ubound, stride, &offset); @@ -2911,7 +2913,6 @@ gfc_descriptor_init_count (tree descriptor, int rank, int corank, return gfc_index_one_node; /* Update the array descriptor with the offset and the span. */ - offset = gfc_evaluate_now (offset, pblock); gfc_conv_descriptor_offset_set (descriptor_block, descriptor, offset); tmp = fold_convert (gfc_array_index_type, element_size); gfc_conv_descriptor_span_set (descriptor_block, descriptor, tmp);