https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080
--- Comment #9 from Mueller <sv.muel...@tu-braunschweig.de> --- (In reply to Mueller from comment #8) > I think, in theory, the compiler could detect something like > > call some_subroutine(function_returning_allocatable()) > > to be a potential case for automatic deallocation of the returned > allocatable. But, as was pointed out above (if I understood correctly), > automatic deallocation of allocatable function results is not part of the > standard. Now that I'm thinking about the example above: Isn't the allocatable function result here a local (temporary) variable and should thus be deallocated automatically?