https://gcc.gnu.org/g:8760e5687e7dbfc19b1951cb84c7f6af0401815a

commit 8760e5687e7dbfc19b1951cb84c7f6af0401815a
Author: Mikael Morin <[email protected]>
Date:   Sun Jun 29 14:15:55 2025 +0200

    fortran: array descriptor: Remove access to the attribute field
    
    Regression tested on powerpc64le-unknown-linux-gnu.  OK for master?
    
    -- >8 --
    
    The attribute field is not used, this removes the single function giving
    direct access to it.
    
    gcc/fortran/ChangeLog:
    
            * trans-descriptor.cc (gfc_conv_descriptor_attribute): Remove
            function.
            * trans-descriptor.h (gfc_conv_descriptor_attribute): Remove
            declaration.

Diff:
---
 gcc/fortran/trans-descriptor.cc | 16 ----------------
 gcc/fortran/trans-descriptor.h  |  1 -
 2 files changed, 17 deletions(-)

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index 15075cf3ec95..be2194f9c5f3 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -306,22 +306,6 @@ gfc_conv_descriptor_elem_len_set (stmtblock_t *block, tree 
desc, tree value)
 }
 
 
-tree
-gfc_conv_descriptor_attribute (tree desc)
-{
-  tree tmp;
-  tree dtype;
-
-  dtype = conv_descriptor_dtype (desc);
-  tmp = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (dtype)),
-                          GFC_DTYPE_ATTRIBUTE);
-  gcc_assert (tmp!= NULL_TREE
-             && TREE_TYPE (tmp) == short_integer_type_node);
-  return fold_build3_loc (input_location, COMPONENT_REF, TREE_TYPE (tmp),
-                         dtype, tmp, NULL_TREE);
-}
-
-
 /* Return a reference to the type discriminator of array descriptor DESC.  */
 
 static tree
diff --git a/gcc/fortran/trans-descriptor.h b/gcc/fortran/trans-descriptor.h
index c28d45281db6..fb5db87edba8 100644
--- a/gcc/fortran/trans-descriptor.h
+++ b/gcc/fortran/trans-descriptor.h
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3.  If not see
 
 
 tree gfc_conv_descriptor_rank (tree);
-tree gfc_conv_descriptor_attribute (tree);
 tree gfc_get_descriptor_dimension (tree);
 tree gfc_conv_descriptor_dimension (tree, tree);
 tree gfc_conv_descriptor_token (tree);

Reply via email to