https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122521
--- Comment #24 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Mikael Morin <[email protected]>: https://gcc.gnu.org/g:6ff8ce3db86e53775e6cc10e5eadfc62fb6ec39f commit r17-3699-g6ff8ce3db86e53775e6cc10e5eadfc62fb6ec39f Author: Mikael Morin <[email protected]> Date: Thu Aug 27 11:49:27 2026 +0200 fortran: array descriptor: Move rank offset construction [PR122521] The construction of the array descriptor debug info uses the rank field layout information to generate an expression for the rank in trans-type.cc's `gfc_get_array_descr_info'. This change moves the rank offset construction to trans-descriptor.cc's `gfc_get_descriptor_offsets_for_info', so that the layout of the rank field doesn't need to be known outside of trans-descriptor.cc. PR fortran/122521 gcc/fortran/ChangeLog: * trans-descriptor.cc (gfc_get_descriptor_offsets_for_info): Remove the dtype offset argument and add a rank offset argument. Set the value of that offset. Use a variable to factor repeated accesses to TYPE_FIELDS (type). * trans-types.cc (gfc_get_array_descr_info): Update caller. Create the rank expression using the just obtained rank offset.
