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

--- Comment #3 from anlauf at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #2)
> Is this actually required?  My feeling would be that is is not, but I may
> well be mistaken.
> 
> Does somebody have chapter & verse on this? And what do other compilers do?

NAG, Intel & Cray do not leak according to valgrind.  NAG also gives a nice
runtime memory trace with -mtrace.

I think the following applies:

F2018 DIS:

9.7.3.2  Deallocation of allocatable variables

8 When a variable of derived type is deallocated, any allocated allocatable
subobject is deallocated. [...]

I do not see any mentioning to whether "variable" is ALLOCATABLE or POINTER
here.

Reply via email to