summaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-03 21:13:42 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-03 21:13:42 +0000
commit9f78c31e7f21fbafffc6a1778f70fc7b85324510 (patch)
tree8da31991a03b702cbf404d3fe909158f795a90d9 /gcc/fortran/resolve.c
parentb45e34ed7e2be5f9a84446d7709e1fda0b9dda97 (diff)
downloadgcc-9f78c31e7f21fbafffc6a1778f70fc7b85324510.tar.gz
2012-12-03 Tobias Burnus <burnus@net-b.de>
Janus Weil <janus@gcc.gnu.org> PR fortran/37336 * class.c (gfc_is_finalizable): New function. * gfortran.h (gfc_is_finalizable): Its prototype. * module.c (mio_component): Read initializer for vtype's _final. * resolve.c (resolve_fl_derived0): Call gfc_is_finalizable. * trans-expr.c (gfc_vtable_final_get): New function. (conv_parent_component_references): Fix comment. (gfc_conv_variable): Fix for scalar coarray components. * trans-intrinsic.c (conv_intrinsic_move_alloc): For BT_CLASS, pass the BT_CLASS type and not the declared type to gfc_deallocate_scalar_with_status. * trans.h (gfc_vtable_final_get): New prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 7d434ddc319..69646dee748 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -12814,6 +12814,10 @@ resolve_fl_derived0 (gfc_symbol *sym)
/* Add derived type to the derived type list. */
add_dt_to_dt_list (sym);
+ /* Check if the type is finalizable. This is done in order to ensure that the
+ finalization wrapper is generated early enough. */
+ gfc_is_finalizable (sym, NULL);
+
return SUCCESS;
}