https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Mikael Morin <mik...@gcc.gnu.org>: https://gcc.gnu.org/g:24c9edfa73632276d7698c103f35833f29804d98 commit r13-6337-g24c9edfa73632276d7698c103f35833f29804d98 Author: Mikael Morin <mik...@gcc.gnu.org> Date: Fri Feb 24 22:11:17 2023 +0100 fortran: Plug leak of associated_dummy memory. [PR108923] This fixes a memory leak by accompanying the release of gfc_actual_arglist elements' memory with a release of the associated_dummy field memory (if allocated). Actual argument copy is adjusted as well so that each copy can free its field independently. PR fortran/108923 gcc/fortran/ChangeLog: * expr.cc (gfc_free_actual_arglist): Free associated_dummy memory. (gfc_copy_actual_arglist): Make a copy of the associated_dummy field if it is set in the original element.