summaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authordomob <domob@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-08 18:19:46 +0000
committerdomob <domob@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-08 18:19:46 +0000
commite449e4dd6cf69248bc463a85285b63f739e8deee (patch)
tree678252b637e4e677cc46910a5305aa008a9af981 /gcc/fortran/decl.c
parentf257af647d2a3072d42969f7a4f10933d8a5c018 (diff)
downloadgcc-e449e4dd6cf69248bc463a85285b63f739e8deee.tar.gz
2008-08-08 Daniel Kraft <d@domob.eu>
* gfortran.h (gfc_finalizer): Replaced member `procedure' by two new members `proc_sym' and `proc_tree' to store the symtree after resolution. (gfc_find_sym_in_symtree): Made public. * decl.c (gfc_match_final_decl): Adapted for new member name. * interface.c (gfc_find_sym_in_symtree): Made public. (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly. * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived): New methods for module-file IO of f2k_derived. (mio_symbol): Do IO of f2k_derived namespace. * resolve.c (gfc_resolve_finalizers): Adapted for new member name and finding the symtree for the symbol here. * symbol.c (gfc_free_finalizer): Adapted for new members. 2008-08-08 Daniel Kraft <d@domob.eu> * gfortran.dg/finalize_9.f03: New test. * gfortran.dg/module_md5_1.f90: Adapted MD5-sum for changed module file format. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138884 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 8b9b8c0e868..2b4bda1fa7f 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -6682,6 +6682,7 @@ cleanup:
}
+
/* Match a FINAL declaration inside a derived type. */
match
@@ -6762,7 +6763,7 @@ gfc_match_final_decl (void)
/* Check if we already have this symbol in the list, this is an error. */
for (f = gfc_current_block ()->f2k_derived->finalizers; f; f = f->next)
- if (f->procedure == sym)
+ if (f->proc_sym == sym)
{
gfc_error ("'%s' at %C is already defined as FINAL procedure!",
name);
@@ -6773,7 +6774,8 @@ gfc_match_final_decl (void)
gcc_assert (gfc_current_block ()->f2k_derived);
++sym->refs;
f = XCNEW (gfc_finalizer);
- f->procedure = sym;
+ f->proc_sym = sym;
+ f->proc_tree = NULL;
f->where = gfc_current_locus;
f->next = gfc_current_block ()->f2k_derived->finalizers;
gfc_current_block ()->f2k_derived->finalizers = f;