https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122521
--- Comment #27 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:5ae7a4447455f863e12f235d4a0a154670d08362 commit r17-3732-g5ae7a4447455f863e12f235d4a0a154670d08362 Author: Mikael Morin <[email protected]> Date: Fri Aug 28 10:28:07 2026 +0200 fortran: array descriptor: Move result default initialization [PR122521] An array descriptor representing an allocatable array function result has its data field initialized to null at the beginning of the function, to implement the initially unallocated status. Move the code generating that initialization for polymorphic functions (both allocatable and pointer) to its own function in trans-descriptor.cc. I think the initialization is unnecessary for pointers, but I'm not changing that here. PR fortran/122521 gcc/fortran/ChangeLog: * trans-decl.cc (gfc_trans_deferred_vars): Move result array descriptor default initialization ... * trans-descriptor.cc (gfc_init_descriptor_result): ... here as a new function. * trans-descriptor.h (gfc_init_descriptor_result): New declaration.
