[Patch, Fortran] Enable the generation of the FINALization wrapper function
Tobias Burnus
burnus@net-b.de
Wed May 22 19:02:00 GMT 2013
Pre-remark: This patch does *not* enable finalization or polymorphic
deallocation.
* * *
Dear all,
The attached patch is a bit boring and invasive, but it paves the way to
FINAL support.
Changes of technical kind:
* Changed ABI for CLASS's virtual table (due to _final) - and, hence, it
bumps the .mod version
* The finalization wrapper is now generated (this should not but might
lead to ICEs)
* It also causes that the virtual table is now more often generated
New feature:
_copy no longer deallocates the "dst" argument. Doing so lead to bogus
finalization with ALLOCATE (exposed with the pending FINAL patch). As a
sideeffect, memset could be removed and CALLOC could be replased by
MALLOC (minute performance advantage). In order to keep the deallocation
in gfc_trans_class_array_init_assign, there is now a call to the
finalization wrapper.
Next steps:
* Add end-of-scope/intent(out) deallocation for polymorphic arrays
* Enable FINAL parsing
* Stepwise enabling for polymorphic deallocation/finalization
* Fix issues with ELEMENTAL(+optional) with intent(out)
* Fix some issues related to intrinsic assignment
* Fix fallout of any of those items
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: final-wrapper-enable.diff
Type: text/x-patch
Size: 9857 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130522/f823ce43/attachment.bin>
More information about the Fortran
mailing list