Mikael Morin wrote:
+++ b/gcc/fortran/trans-decl.c
@@ -3872,7 +3892,8 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym,
gfc_wrapped_block * block)
/* Deallocate when leaving the scope. Nullifying is not
needed. */
- if (!sym->attr.result && !sym->attr
Le 03/06/2013 12:22, Tobias Burnus a écrit :
> * PING *
>
> Attached is just a re-diff.
>
> OK for the trunk?
>
Hello, it looks good; one question below...
> diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
> index 100ec18..7521dee 100644
> --- a/gcc/fortran/trans-decl.c
> +++ b/
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,t
Small update of the patch. Changes:
* There was a problem finalizing "var(:)%comp", which lead to an ICE.
Thanks to Dominique pointed out. See "expr->rank =" code added in
gfc_add_finalizer_call. I added the full test case from PR37336 (dg-do
compile: finalize_14.f90) to test for this.
* I
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 a