https://gcc.gnu.org/g:66efb52d8615e049a854e052ddf00c31188df3a8

commit 66efb52d8615e049a854e052ddf00c31188df3a8
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Fri Jan 17 17:48:42 2025 +0100

    Factorisation set_contiguous_array

Diff:
---
 gcc/fortran/trans-array.cc | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 33e4ede985a4..c08664a5a053 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -11174,21 +11174,10 @@ structure_alloc_comps (gfc_symbol * der_type, tree 
decl, tree dest,
              cdesc = gfc_create_var (cdesc, "cdesc");
              DECL_ARTIFICIAL (cdesc) = 1;
 
-             gfc_add_modify (&dealloc_block, gfc_conv_descriptor_dtype (cdesc),
-                             gfc_get_dtype_rank_type (1, tmp));
-             gfc_conv_descriptor_lbound_set (&dealloc_block, cdesc,
-                                             gfc_index_zero_node,
-                                             gfc_index_one_node);
-             gfc_conv_descriptor_stride_set (&dealloc_block, cdesc,
-                                             gfc_index_zero_node,
-                                             gfc_index_one_node);
-             gfc_conv_descriptor_ubound_set (&dealloc_block, cdesc,
-                                             gfc_index_zero_node, ubound);
-
              if (attr->dimension)
                comp = gfc_conv_descriptor_data_get (comp);
 
-             gfc_conv_descriptor_data_set (&dealloc_block, cdesc, comp);
+             set_contiguous_array (&dealloc_block, cdesc, ubound, comp);
 
              /* Now call the deallocator.  */
              vtab = gfc_find_vtab (&c->ts);

Reply via email to