[gcc(refs/users/mikael/heads/refactor_descriptor_v08)] Factorisation set_dimension_fields gfc_set_descriptor
Mikael Morin
mikael@gcc.gnu.org
Sat Sep 6 14:58:47 GMT 2025
https://gcc.gnu.org/g:215eb06af7873eb0c10f393382343db0703ea2fc
commit 215eb06af7873eb0c10f393382343db0703ea2fc
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Sat Aug 16 18:11:01 2025 +0200
Factorisation set_dimension_fields gfc_set_descriptor
Diff:
---
gcc/fortran/trans-descriptor.cc | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index d16127cf3ed7..ce7495ab1f34 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -1860,27 +1860,14 @@ gfc_set_descriptor (stmtblock_t *block, tree dest, tree src, gfc_expr *src_expr,
tree from = lowers[dim];
tree to = uppers[dim];
- gfc_conv_descriptor_lbound_set (block, dest,
- gfc_rank_cst[dim], from);
-
- /* Set the new upper bound. */
- gfc_conv_descriptor_ubound_set (block, dest,
- gfc_rank_cst[dim], to);
-
/* Multiply the stride by the section stride to get the
total stride. */
stride = fold_build2_loc (input_location, MULT_EXPR,
gfc_array_index_type,
stride, info->stride[n]);
- tmp = fold_build2_loc (input_location, MULT_EXPR,
- TREE_TYPE (offset), stride, from);
- offset = fold_build2_loc (input_location, MINUS_EXPR,
- TREE_TYPE (offset), offset, tmp);
-
- /* Store the new stride. */
- gfc_conv_descriptor_stride_set (block, dest,
- gfc_rank_cst[dim], stride);
+ set_dimension_fields (block, dest, gfc_rank_cst[dim], from, to, stride,
+ &offset);
}
for (int n = rank; n < rank + corank; n++)
More information about the Gcc-cvs
mailing list