[gcc(refs/users/mikael/heads/refactor_descriptor_v202.02)] fortran: array descriptor: Rename internal field accessor for span [PR122521]

Mikael Morin via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:4fbfdc7b6d39888731cf5d00c4d949fe0d8c3e2d

commit 4fbfdc7b6d39888731cf5d00c4d949fe0d8c3e2d
Author: Mikael Morin <[email protected]>
Date:   Thu Nov 6 14:21:32 2025 +0100

    fortran: array descriptor: Rename internal field accessor for span [PR122521]
    
    Regression tested on aarch64-unknown-linux-gnu.  OK for master?
    
    -- >8 --
    
    Make the internal accessor for span respect the convention that static
    functions don't have the `gfc_' prefix.
    
            PR fortran/122521
    
    gcc/fortran/ChangeLog:
    
            * trans-descriptor.cc (gfc_conv_descriptor_span): Rename ...
            (conv_descriptor_span): ... to this.
            (gfc_conv_descriptor_span_get, gfc_conv_descriptor_span_set): Update
            callers.

Diff:
---
 gcc/fortran/trans-descriptor.cc | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index b0379f6470aa..c9450414052b 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -172,24 +172,31 @@ gfc_conv_descriptor_dtype_set (stmtblock_t *block, tree desc, tree value)
 }
 
 
+/* Return a reference to the span field of the array descriptor DESC.  */
+
 static tree
-gfc_conv_descriptor_span (tree desc)
+conv_descriptor_span (tree desc)
 {
   tree field = gfc_get_descriptor_field (desc, SPAN_FIELD);
   gcc_assert (TREE_TYPE (field) == gfc_array_index_type);
   return field;
 }
 
+/* Return the span value of the array descriptor DESC.  */
+
 tree
 gfc_conv_descriptor_span_get (tree desc)
 {
-  return gfc_conv_descriptor_span (desc);
+  return conv_descriptor_span (desc);
 }
 
+/* Add code to BLOCK assigning VALUE to the span field of the array descriptor
+   DESC.  */
+
 void
 gfc_conv_descriptor_span_set (stmtblock_t *block, tree desc, tree value)
 {
-  tree t = gfc_conv_descriptor_span (desc);
+  tree t = conv_descriptor_span (desc);
   gfc_add_modify (block, t, fold_convert (TREE_TYPE (t), value));
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.