https://gcc.gnu.org/g:05518efeaf929da883aca97922579c9d043d37b0

commit 05518efeaf929da883aca97922579c9d043d37b0
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Thu Jan 30 21:23:18 2025 +0100

    Correction erreur compil'

Diff:
---
 gcc/fortran/trans-expr.cc | 64 -----------------------------------------------
 1 file changed, 64 deletions(-)

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 2ece9d369d80..205c49949626 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -800,70 +800,6 @@ gfc_get_vptr_from_expr (tree expr)
 }
 
 
-int
-gfc_descriptor_rank (tree descriptor)
-{
-  if (TREE_TYPE (descriptor) != NULL_TREE)
-    return GFC_TYPE_ARRAY_RANK (TREE_TYPE (descriptor));
-
-  tree dim = gfc_get_descriptor_dimension (descriptor);
-  tree dim_type = TREE_TYPE (dim);
-  gcc_assert (TREE_CODE (dim_type) == ARRAY_TYPE);
-  tree idx_type = TYPE_DOMAIN (dim_type);
-  gcc_assert (TREE_CODE (idx_type) == INTEGER_TYPE);
-  gcc_assert (integer_zerop (TYPE_MIN_VALUE (idx_type)));
-  tree idx_max = TYPE_MAX_VALUE (idx_type);
-  if (idx_max == NULL_TREE)
-    return GFC_MAX_DIMENSIONS;
-  wide_int max = wi::to_wide (idx_max);
-  return max.to_shwi () + 1;
-}
-
-
-void
-gfc_copy_sequence_descriptor (stmtblock_t &block, tree lhs_desc, tree rhs_desc,
-                             bool assumed_rank_lhs)
-{
-  int lhs_rank = gfc_descriptor_rank (lhs_desc);
-  int rhs_rank = gfc_descriptor_rank (rhs_desc);
-  tree desc;
-
-  if (assumed_rank_lhs || lhs_rank == rhs_rank)
-    desc = rhs_desc;
-  else
-    {
-      tree arr = gfc_create_var (TREE_TYPE (lhs_desc), "parm");
-      gfc_conv_descriptor_data_set (&block, arr,
-                                   gfc_conv_descriptor_data_get (rhs_desc));
-      gfc_conv_descriptor_lbound_set (&block, arr, gfc_index_zero_node,
-                                     gfc_index_zero_node);
-      tree size = gfc_conv_descriptor_size (rhs_desc, rhs_rank);
-      gfc_conv_descriptor_ubound_set (&block, arr, gfc_index_zero_node, size);
-      gfc_conv_descriptor_stride_set (
-       &block, arr, gfc_index_zero_node,
-       gfc_conv_descriptor_stride_get (rhs_desc, gfc_index_zero_node));
-      for (int i = 1; i < lhs_rank; i++)
-       {
-         gfc_conv_descriptor_lbound_set (&block, arr, gfc_rank_cst[i],
-                                         gfc_index_zero_node);
-         gfc_conv_descriptor_ubound_set (&block, arr, gfc_rank_cst[i],
-                                         gfc_index_zero_node);
-         gfc_conv_descriptor_stride_set (&block, arr, gfc_rank_cst[i], size);
-       }
-      gfc_add_modify (&block, gfc_conv_descriptor_dtype (arr),
-                     gfc_conv_descriptor_dtype (rhs_desc));
-      gfc_add_modify (&block, gfc_conv_descriptor_rank (arr),
-                     build_int_cst (signed_char_type_node, lhs_rank));
-      gfc_conv_descriptor_span_set (&block, arr,
-                                   gfc_conv_descriptor_span_get (arr));
-      gfc_conv_descriptor_offset_set (&block, arr, gfc_index_zero_node);
-      desc = arr;
-    }
-
-  gfc_class_array_data_assign (&block, lhs_desc, desc, true);
-}
-
-
 void
 gfc_class_array_data_assign (stmtblock_t *block, tree lhs_desc, tree rhs_desc,
                             bool)

Reply via email to