http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|domob at gcc dot gnu.org    |unassigned at gcc dot
                   |                            |gnu.org

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-07 
10:09:52 UTC ---
Regarding FINAL but also normal deallocation - including polymorphic
deallocation: Variables with the SAVE attribute shouldn't be automatically
deallocated. That includes variables of the main program which are implicitly
SAVE!

Currently, gfortran deallocates them automatically, which is nice for
"valgrind" results - and not detectable by the program.

However, with FINAL - but also for allocatable coarrays (except
-fcoarray=single) - one cannot do it. Coarrays might be still accessed from
other images while FINAL shouldn't be called - thus a simple 'print *,
"gotcha"' in FINAL would be able to detect this.

Note: A normal freeing for noncoarrays, including polymorphic freeing, would be
still possible if one simply skips all FINAL calls. At least I do not see how
that should be detectable from within the program.

Reply via email to