https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.org --- Comment #15 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- (In reply to Mueller from comment #14) > I'd really like to know why this report has been closed although there may > be a problem with deallocation. I think the rephrasing of Mikael pinpointed > what I meant. This is a tricky question to 'see'. Whether or not a temporary is used as Mikael states, seems to be an implementation dependent artifact. dummy_create_allocatable() is allocating an object. dummy_do_nothing takes it as intent(in) so it is not modified or changed in anyway. dummy_trigger does not do anything with it and as written can not even access it. So I think the example program itself is or ought to be invalid. Then from my simple minded view you can choose to ignore the situation, generate a diagnostic like "unused function result", or as Mikael suggested, maybe try to clean it up. The least effort approach is do nothing with this, especially since doing something gains nothing from a program that does nothing. It gets to be a policy or philosophical question. One could also make a point that the underlying operating system software takes care of it as well. Regardless, the code is sort of intriguing leaving things sort of hanging there. If it is indicative of some other underlying issue yet to be uncovered of course we should fix it. comp.lang.fortran might be a better place for the broader questions of what 'should' it do.