[Bug fortran/69080] No automatic deallocation of allocatable function results

sv.mueller@tu-braunschweig.de gcc-bugzilla@gcc.gnu.org
Wed Jan 6 11:04:00 GMT 2016


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

--- Comment #9 from Mueller <sv.mueller@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?


More information about the Gcc-bugs mailing list