[Bug fortran/80477] [OOP] Polymorphic function result generates memory leak

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 26 10:59:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80477

--- Comment #14 from janus at gcc dot gnu.org ---
(In reply to paul.richard.thomas@gmail.com from comment #11)
> I'll take a look tonight. I believe, without the source in front of me, that
> 
> s/gfc_add_expr_to_block (&post, gfc_call_free
> (tmp));/gfc_add_expr_to_block (&se->post, gfc_call_free (tmp));

Thanks for the suggestion, Paul. I just tried it, but unfortunately it makes
exactly zero difference, probably because gfc_conv_procedure_call has at the
very end:

      gfc_add_block_to_block (&se->post, &post);


More information about the Gcc-bugs mailing list