https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98342
Bug ID: 98342 Summary: Allocatable component in call to assumed-rank routine causes invalid pointer Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mscfd at gmx dot net Target Milestone: --- Created attachment 49784 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49784&action=edit Fortran source code The attached code aborts with *** Error in `./alloc_rank.x': munmap_chunk(): invalid pointer after finishing the function call to "sel_rank". Necessary ingredients are a derived type with an allocatable component and that the argument tuple of "sel_rank" has assumed rank.