https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80477
--- Comment #14 from janus at gcc dot gnu.org --- (In reply to paul.richard.tho...@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);