[gcc r17-2551] 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:2084afeb6a34045ede326236316d23aac24cd57f

commit r17-2551-g2084afeb6a34045ede326236316d23aac24cd57f
Author: Mikael Morin <[email protected]>
Date:   Mon Jul 20 11:09:46 2026 +0200

    fortran: array descriptor: Rename internal field accessor for span [PR122521]
    
    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.