[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction initialisation bornes temp alloc_comp_assign_12.f03
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 14:47:13 GMT 2025
https://gcc.gnu.org/g:63f2e3f6b0875999694f89d1c35d408c70580617
commit 63f2e3f6b0875999694f89d1c35d408c70580617
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Wed Feb 19 20:06:10 2025 +0100
Correction initialisation bornes temp alloc_comp_assign_12.f03
Diff:
---
gcc/fortran/trans-array.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index e05893e42564..e4c581813e02 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -3672,7 +3672,7 @@ set_temporary_descriptor (stmtblock_t *block, tree desc, tree class_src,
tree lbound[GFC_MAX_DIMENSIONS],
tree ubound[GFC_MAX_DIMENSIONS],
tree stride[GFC_MAX_DIMENSIONS], int rank,
- bool callee_allocated, bool rank_changer,
+ bool omit_bounds, bool rank_changer,
bool shift_bounds)
{
int n;
@@ -3700,7 +3700,7 @@ set_temporary_descriptor (stmtblock_t *block, tree desc, tree class_src,
}
tree offset = gfc_index_zero_node;
- if (!callee_allocated)
+ if (!omit_bounds)
{
for (n = 0; n < rank; n++)
{
@@ -4032,6 +4032,8 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, gfc_ss * ss,
}
}
+ bool bounds_known = size != NULL_TREE;
+
/* Get the size of the array. */
if (size && !callee_alloc)
{
@@ -4055,8 +4057,7 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, gfc_ss * ss,
dealloc);
set_temporary_descriptor (pre, desc, class_expr, elemsize, data_ptr,
- from, to, stride, total_dim,
- size == NULL_TREE || callee_alloc,
+ from, to, stride, total_dim, !bounds_known,
rank_changer, shift_bounds);
while (ss->parent)
More information about the Gcc-cvs
mailing list