https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122521
--- Comment #16 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:9ca72f5f8e94218eca77198156e157919dc000eb commit r17-2546-g9ca72f5f8e94218eca77198156e157919dc000eb Author: Mikael Morin <[email protected]> Date: Mon Jul 20 11:08:51 2026 +0200 fortran: array descriptor: Add accessors for the dtype field [PR122521] Use accessor functions to get or set the dtype 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_dtype): Make static and rename ... (conv_descriptor_dtype): ... to this. (conv_descriptor_rank conv_descriptor_version, conv_descriptor_elem_len, gfc_conv_descriptor_attribute, conv_descriptor_type): Update callers. (gfc_conv_descriptor_dtype_get, gfc_conv_descriptor_dtype_set): New functions. * trans-descriptor.h (gfc_conv_descriptor_dtype): Remove declaration. (gfc_conv_descriptor_dtype_get, gfc_conv_descriptor_dtype_set): New declarations. * trans-array.cc (gfc_trans_create_temp_array, gfc_array_init_size, gfc_conv_expr_descriptor, gfc_resize_assumed_rank_dim_field, gfc_conv_array_parameter, structure_alloc_comps, gfc_alloc_allocatable_for_assignment, gfc_trans_class_array, gfc_trans_deferred_array): Use gfc_conv_descriptor_dtype_get to get the value of the dtype field and gfc_conv_descriptor_dtype_set to update it. * trans-decl.cc (gfc_conv_cfi_to_gfc): Likewise. * trans-expr.cc (gfc_conv_scalar_to_descriptor, gfc_class_array_data_assign, gfc_conv_derived_to_class, gfc_conv_class_to_class, set_dtype_for_unallocated, gfc_trans_pointer_assignment, fcncall_realloc_result): Likewise. * trans-intrinsic.cc (conv_isocbinding_subroutine): Likewise. * trans-stmt.cc (trans_associate_var): Likewise.
