[gcc(refs/users/mikael/heads/refactor_descriptor_v03)] Factorisation set_descriptor_dimension
Mikael Morin
mikael@gcc.gnu.org
Fri Mar 14 16:13:40 GMT 2025
https://gcc.gnu.org/g:9e7f308a27f07113aa9e39d1d5a1340f7af3d2a8
commit 9e7f308a27f07113aa9e39d1d5a1340f7af3d2a8
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Thu Feb 13 20:26:47 2025 +0100
Factorisation set_descriptor_dimension
Correction typo
Diff:
---
gcc/fortran/trans-array.cc | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index ecffd0d5c0c6..5be7e29130d3 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -1906,6 +1906,9 @@ set_bounds_update_offset (stmtblock_t *block, tree desc, int dim,
gfc_conv_descriptor_stride_set (block, desc,
gfc_rank_cst[dim], stride);
+ if (!offset && !next_stride)
+ return;
+
/* Update offset. */
tree tmp = fold_build2_loc (input_location, MULT_EXPR,
gfc_array_index_type, lbound_diff, stride);
@@ -3664,13 +3667,8 @@ set_temporary_descriptor (stmtblock_t *block, tree desc, tree class_src,
for (n = 0; n < rank; n++)
{
/* Store the stride and bound components in the descriptor. */
- gfc_conv_descriptor_stride_set (block, desc, gfc_rank_cst[n],
- stride[n]);
-
- gfc_conv_descriptor_lbound_set (block, desc, gfc_rank_cst[n],
- gfc_index_zero_node);
-
- gfc_conv_descriptor_ubound_set (block, desc, gfc_rank_cst[n], ubound[n]);
+ set_descriptor_dimension (block, desc, n, gfc_index_zero_node, ubound[n],
+ stride[n], nullptr, nullptr);
}
}
More information about the Gcc-cvs
mailing list