https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92189
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- Created attachment 47227 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47227&action=edit Minor cleanup patch for trans-decl.c's convert_CFI_desc I think there many issues: (A) For assumed-shape/assumed-rank arrays, there is trans-decl.c's convert_CFI_desc – I believe that copy-out is not needed as only pointer/allocatable arrays can change the dimensions and the data/base_addr pointer is already shared between the descriptors. → Attached patch. (B) For pointer/allocatable arrays (including assumed-rank?), there is currently in the caller _gfortran_gfc_desc_to_cfi_desc (&cfi.4, &a) before and _gfortran_cfi_desc_to_gfc_desc (&a, &cfi.4) after the call. However, in the called function 'sub', the code assumes that a Fortran and not a CFI descriptor is passed. There is no descriptor conversion at all!