diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-12-03 22:13:42 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-12-03 22:13:42 +0100 |
commit | 86035eeca65c54f7325fb6edd5839e3b59ad5002 (patch) | |
tree | 8da31991a03b702cbf404d3fe909158f795a90d9 /gcc/fortran/gfortran.h | |
parent | 0e668eaf774f01c3c8938840576652b0d21ad3ca (diff) | |
download | gcc-86035eeca65c54f7325fb6edd5839e3b59ad5002.tar.gz |
re PR fortran/37336 ([F03] Finish derived-type finalization)
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.
Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r194104
Diffstat (limited to 'gcc/fortran/gfortran.h')
-rw-r--r-- | gcc/fortran/gfortran.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 4942c1c920e..bf767b2ac97 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -2951,6 +2951,7 @@ void gfc_add_class_array_ref (gfc_expr *); #define gfc_add_hash_component(e) gfc_add_component_ref(e,"_hash") #define gfc_add_size_component(e) gfc_add_component_ref(e,"_size") #define gfc_add_def_init_component(e) gfc_add_component_ref(e,"_def_init") +#define gfc_add_final_component(e) gfc_add_component_ref(e,"_final") bool gfc_is_class_array_ref (gfc_expr *, bool *); bool gfc_is_class_scalar_expr (gfc_expr *); bool gfc_is_class_container_ref (gfc_expr *e); @@ -2967,6 +2968,7 @@ gfc_typebound_proc* gfc_find_typebound_intrinsic_op (gfc_symbol*, gfc_try*, gfc_intrinsic_op, bool, locus*); gfc_symtree* gfc_get_tbp_symtree (gfc_symtree**, const char*); +bool gfc_is_finalizable (gfc_symbol *, gfc_expr **); #define CLASS_DATA(sym) sym->ts.u.derived->components |