https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102287
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:6527feb07c31689c6d31b7bd16fec9ada691e06b commit r11-9015-g6527feb07c31689c6d31b7bd16fec9ada691e06b Author: Harald Anlauf <anl...@gmx.de> Date: Thu Sep 16 20:12:21 2021 +0200 Fortran - fix handling of optional allocatable DT arguments with INTENT(OUT) gcc/fortran/ChangeLog: PR fortran/102287 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of allocatable components of optional allocatable derived type procedure arguments with INTENT(OUT) into a presence check. gcc/testsuite/ChangeLog: PR fortran/102287 * gfortran.dg/intent_out_14.f90: New test. (cherry picked from commit cfea7b86f2430b9cb8018379b071f4004233119c)