Hi all, the attached patch fixes a runtime memory leak with procedure-pointer components (PPCs). gfortran correctly deallocates scalar allocatable function results (also for procedure pointers), but fails to do so for PPCs, which is cured by my patch. [Note: Since gfortran translates any type-bound procedure call into a PPC call internally, the patch also cures memory leaks with TBPs.] It regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2017-06-15 Janus Weil PR fortran/70983 * trans-expr.c (gfc_conv_procedure_call): Deallocate the result of scalar allocatable procedure-pointer components. 2017-06-15 Janus Weil PR fortran/70983 * gfortran.dg/proc_ptr_comp_51.f90: New test.