https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87359
Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org --- Comment #14 from Paul Thomas <pault at gcc dot gnu.org> --- Created attachment 44733 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44733&action=edit Patch for the PR Dear Juergen and Dominique, Could you please test the attached patch? It eliminates the deallocation of one of the temporaries produced by: allocate (process%mci, source=process%component%extract_mci_template ()) but leaves the finalization call used on the other temporary. When one of the temporaries is deallocated/finalized the other temporary is not nulled. Hence the valgrind complaints. Valgrind now shows no errors and that all memory is freed. Regards Paul