This is the mail archive of the
mailing list for the GCC project.
*ping* Re: [Patch, Fortran, 4.9] Minor FINAL preparation patch
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Cc: Janus Weil <janus at gcc dot gnu dot org>
- Date: Sat, 30 Mar 2013 21:53:38 +0100
- Subject: *ping* Re: [Patch, Fortran, 4.9] Minor FINAL preparation patch
- References: <51405455 dot 4090705 at net-b dot de> <5152C191 dot 9080203 at net-b dot de>
*** PING ***
The patch is rather simple and almost three weeks old ... Even if it is
mostly a no-op patch (as long as FINAL is disabled), I'd like to get it
out of my tree.
On March 27, 2013 10:53, Tobias Burnus wrote:
** PING **
And an updated patch. Changes:
- Updated isym handling due to the ISO_C_BINDING patch
- Fixed some bugs in the generated code for finalizing arrays (mainly
Build and tested on x86-64-gnu-linux.
OK for the trunk?
PS: Regarding true FINAL support: The current draft patch* mostly
works, except for: Polymorphic arrays aren't deallocated at the end of
the scope (old bug), allocatables are wrongly finalized at the end of
the main program, and for allocatable,intent(out), no finalization is
done. After those issues are fixed and some code cleanup has be done,
the patch should be ready.
On March 13, 2013 11:26 a.m., Tobias Burnus wrote:
this small patch fixes some small issues with the current FINAL
implementation, which is still disabled. Namely:
(a) class.c: TRANSFER has an optional size= argument; if one doesn't
has an actual-argument (which can be expr == NULL), it segfaults.
(b) class.c: SIZE needs to return an index-size-kind integer not a
default-kind integer (tree checking error, but potentially also wrong
(c) trans.c: Scalar coarrays (with -fcoarray=lib) were mishandled -
they also use an array descriptor
Build and regtested on x86-64-gnu-linux.
(I target 4.9 with this patch; in principle, it could also be applied
to 4.8: The code is not used, yet, and thus it shouldn't harm on 4.8
but there is also no benefit.)
The full patch, which enables finalization and regtests is available
at: https://userpage.physik.fu-berlin.de/~tburnus/final/ â The patch
still requires some clean up. In addition, finalization (with a user
FINAL subroutine) is mishandled for allocatable INTENT(OUT) as
gfortran handles it (at least partially) in the caller
(trans-expr.c's gfc_conv_procedure_call) and not in the callee
(trans-decl.c). That will lead to not finalizing and segfaults at run
time. There are more issues, but for an experimental implementation,
fixing this issue should be enough. (Note: the .mod version should be
bumped to force recompilation, which is required due to the ABI
change of the vtable.)