*ping* - Re: [Patch, Fortran] Enable FINALization/poly dealloc for allocatables

Tobias Burnus burnus@net-b.de
Mon Jun 3 10:22:00 GMT 2013


* PING *

Attached is just a re-diff.

OK for the trunk?

Tobias

PS: This patch blocks the patch for finalization of nonallocatable 
intent(out) at http://gcc.gnu.org/ml/fortran/2013-05/msg00135.html (with 
additional test case at 
http://gcc.gnu.org/ml/fortran/2013-05/msg00141.html). It additionally 
blocks me from working on follow-up patches.


On May 31, 2013, Tobias Burnus wrote:
> And another one: I just realized that the following dead code can be 
> removed (twice):
> +      if (TREE_CODE (array) == ADDR_EXPR
> +          && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (array, 0))))
> +        tmp = TREE_OPERAND (array, 0);
> As "tmp" is not used. That's part of gfc_build_final_call,thus, I 
> cannot easily do it as follow up patch.
[...]
>>> On Wed, May 29, 2013, Tobias Burnus wrote:
>>>> 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.)
>>> ...
>>>> 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-v5.diff
Type: text/x-patch
Size: 41967 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130603/1a43fcd5/attachment.bin>


More information about the Fortran mailing list