From d92bcdec2fd695608a1d351b64b8f0ea14bc41db Mon Sep 17 00:00:00 2001 From: burnus Date: Sun, 9 Dec 2012 15:29:32 +0000 Subject: [PATCH] 2012-12-09 Tobias Burnus * trans-array.c (gfc_deallocate_scalar_with_status): Use NULL_TREE in the call to gfc_deallocate_scalar_with_status. * trans-decl.c (gfc_trans_deferred_vars): Pass symbol. * trans-stmt.c (gfc_trans_deallocate): Pass polymorphic * variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194332 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 11 ++++++++++- gcc/fortran/trans-array.c | 2 +- gcc/fortran/trans-decl.c | 7 ++++--- gcc/fortran/trans-stmt.c | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 12d53ee..aa9eb9f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,7 +1,16 @@ +2012-12-09 Tobias Burnus + + * trans-array.c (gfc_deallocate_scalar_with_status): Use + NULL_TREE in the call to gfc_deallocate_scalar_with_status. + * trans-decl.c (gfc_trans_deferred_vars): Pass symbol. + * trans-stmt.c (gfc_trans_deallocate): Pass polymorphic variable. + 2012-12-09 Thomas Koenig PR fortran/55593 - * gfortran.dg/do_check_8.f90: New test. + * frontend-passes.c (doloop_code): Use resolved_sym + instead of n.sym->formal for formal argument list + to get the correct version for all generic subroutines. 2012-12-05 Tobias Burnus diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 24adfde..0689892 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -7589,7 +7589,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, CLASS_DATA (c)->attr.codimension); else { - tmp = gfc_deallocate_scalar_with_status (comp, NULL, true, NULL, + tmp = gfc_deallocate_scalar_with_status (comp, NULL_TREE, true, NULL, CLASS_DATA (c)->ts); gfc_add_expr_to_block (&tmpblock, tmp); called_dealloc_with_status = true; diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 3bee178..b236050 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -3780,9 +3780,10 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) NULL_TREE, true, NULL, true); else - tmp = gfc_deallocate_scalar_with_status (se.expr, NULL, - true, NULL, - sym->ts); + tmp = gfc_deallocate_scalar_with_status (se.expr, NULL_TREE, + true, + gfc_lval_expr_from_sym (sym), + sym->ts); } if (sym->ts.type == BT_CLASS) { diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 79dc27d..6fe8b77 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -5380,7 +5380,7 @@ gfc_trans_deallocate (gfc_code *code) else { tmp = gfc_deallocate_scalar_with_status (se.expr, pstat, false, - expr, expr->ts); + al->expr, al->expr->ts); gfc_add_expr_to_block (&se.pre, tmp); /* Set to zero after deallocation. */ -- 2.7.4