https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122521
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Mikael Morin <[email protected]>: https://gcc.gnu.org/g:c7da3fed0cbd74d1ad61282da69c5052697a21d6 commit r17-2544-gc7da3fed0cbd74d1ad61282da69c5052697a21d6 Author: Mikael Morin <[email protected]> Date: Mon Jul 20 11:08:29 2026 +0200 fortran: array descriptor: Add accessors for the rank field [PR122521] Add accessor functions to get or set the value of the rank field of array descriptors, and remove from the public API the function giving direct acces to the field. PR fortran/122521 gcc/fortran/ChangeLog: * trans-descriptor.cc (gfc_conv_descriptor_rank): Make static and rename ... (conv_descriptor_rank): ... to this. (gfc_conv_descriptor_rank_get, gfc_conv_descriptor_rank_set): New functions. * trans-descriptor.h (gfc_conv_descriptor_rank): Remove declaration. (gfc_conv_descriptor_rank_get, gfc_conv_descriptor_rank_set): New declarations. * trans-array.cc (gfc_trans_create_temp_array, gfc_conv_ss_startstride, gfc_tree_array_size, gfc_resize_assumed_rank_dim_field, gfc_conv_array_parameter, gfc_full_array_size, duplicate_allocatable_coarray): Use gfc_conv_descriptor_rank_get to get the value of the rank field, and gfc_conv_descriptor_rank_set to set it. * trans-decl.cc (gfc_conv_cfi_to_gfc): Likewise. * trans-expr.cc (gfc_conv_derived_to_class, gfc_conv_variable, gfc_conv_gfc_desc_to_cfi_desc, conv_null_actual, gfc_trans_structure_assign): Likewise. * trans-intrinsic.cc (gfc_conv_intrinsic_rank, gfc_conv_intrinsic_bound, gfc_conv_intrinsic_sizeof, gfc_conv_associated): Likewise. * trans-openmp.cc (gfc_omp_get_array_size): Likewise. * trans-stmt.cc (gfc_trans_select_rank_cases): Likewise.
