[Fortran] PR37336 - FIINAL patch [1/n]: Implement the finalization wrapper subroutine

Tobias Burnus burnus@net-b.de
Wed Aug 29 19:54:00 GMT 2012


Dear all,

that's the revised version of patch at 
http://gcc.gnu.org/ml/fortran/2012-08/msg00095.html, taking the review 
comments into account.

Reminder: This patch only generates the finalization wrapper, which is 
in the virtual table. It does not add the required calls; hence, it 
still doesn't allow to use finalization.


The patch consists of three parts:

a) The main patch, which implements the wrapper.
   I am asking for approval for that patch.

b) A patch which removes the gfc_error "not yet implemented"
   I suggest to only remove the error after finalization calls have been 
added

c) A patch which bumps the .mod version
    - or alternatively -
    a patch which disables the _final generation in the vtable.

I have build and regtested (on x86-64-linux) the patch with (a) and 
(a)+(b) applied.


I would like to include the patch (c) as modifying the vtable changes 
the ABI. Bumping the .mod version is a reliable way to force 
recompilation. The alternative is to wait until the final FINAL patch 
before bumping the .mod version (and disable the "_final" generation).

One possibility, if deemed useful, is to combine the .mod version bump 
with backward compatible reading of .mod files, i.e., only error out 
when BT_CLASS is encountered in an old .mod file.


Is the patch (a) OK for the trunk? With which version of (c)?

(I am slightly inclined to do the .mod bump now. As a follow up, one can 
also commit Janus' proc-pointer patch, 
http://gcc.gnu.org/ml/fortran/2012-04/msg00033.html, though I think 
someone has still to review it.)

Tobias

PS: When doing the ABI change, I am going to document it in the release 
notes / wiki.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: final-wrapper-v3-1.diff
Type: text/x-patch
Size: 35009 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120829/f273076f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: final-wrapper-v3-2.diff
Type: text/x-patch
Size: 4233 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120829/f273076f/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: final-wrapper-v3-3ab.diff
Type: text/x-patch
Size: 1727 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120829/f273076f/attachment-0002.bin>


More information about the Fortran mailing list