[Patch, Fortran] Enable FINALization/poly dealloc for allocatables
Tobias Burnus
burnus@net-b.de
Wed May 29 08:28:00 GMT 2013
Dear all,
this patch enables finalization (and polymorphic deallocation) for
allocatables for: end of scope, DEALLOCATE and intent(out).
As a side effect, an allocatable is no longer deallocated at the end of
the main program. (Variables declared in the main program have
automatically SAVE attribute; before finalization, it made no difference
but with finalization it is detectable. And only finalizing
nonfinalizable allocatables seems to be too much effort for too little
gain.)
Note: This patch requires the following patch, which is still pending
review:
* Enable wrapper generation,
http://gcc.gnu.org/ml/fortran/2013-05/msg00073.html
<http://gcc.gnu.org/ml/fortran/2013-05/msg00093.html>
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
Tobias
PS: Fortran requires additional cases where finalization has to happen;
those will be added in follow-up patches.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: finalize-alloc.diff
Type: text/x-patch
Size: 27934 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130529/2caa7a24/attachment.bin>
More information about the Fortran
mailing list