aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2009-04-24 17:20:23 +0200
committerDaniel Kraft <domob@gcc.gnu.org>2009-04-24 17:20:23 +0200
commite34ccb4cd1f39f31ff1bd7374ece738ec7521d74 (patch)
tree6857c66e3f14011e7afd4f510d84a7d7ded9cc88 /gcc/fortran/primary.c
parentb178461a93752916e0ff817e7db879aa638ab956 (diff)
downloadgcc-e34ccb4cd1f39f31ff1bd7374ece738ec7521d74.zip
gcc-e34ccb4cd1f39f31ff1bd7374ece738ec7521d74.tar.gz
gcc-e34ccb4cd1f39f31ff1bd7374ece738ec7521d74.tar.bz2
gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
2009-04-24 Daniel Kraft <d@domob.eu> * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function. (struct gfc_symtree): Moved `typebound' member inside union. (struct gfc_namespace): Add `tb_sym_root' as new symtree to sort out type-bound procedures there. (gfc_get_tbp_symtree): New procedure. * symbol.c (tentative_tbp_list): New global. (gfc_get_namespace): NULL new `tb_sym_root' member. (gfc_new_symtree): Removed initialization of `typebound' member. (gfc_undo_symbols): Process list of tentative tbp's. (gfc_commit_symbols): Ditto. (free_tb_tree): New method. (gfc_free_namespace): Call it. (gfc_get_typebound_proc): New method. (gfc_get_tbp_symtree): New method. (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree and gfc_namespace with regards to tbp's. * dump-parse-tree.c (show_typebound): Ditto. * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol as it isn't a symbol any longer. * module.c (mio_typebound_symtree): Adapt to changes. (mio_typebound_proc): Ditto, create symtrees using `gfc_get_tbp_symtree' rather than `gfc_get_sym_tree'. (mio_f2k_derived): Ditto. * decl.c (match_procedure_in_type): Ditto. (gfc_match_generic): Ditto. Don't reference tbp-symbol. * resolve.c (check_typebound_override): Adapt to changes. (resolve_typebound_generic): Ditto. (resolve_typebound_procedures): Ditto. (ensure_not_abstract_walker): Ditto. (ensure_not_abstract): Ditto. (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for instance, through removed tentative ones). * gfc-internals.texi (Type-bound procedures): Document changes. 2009-04-24 Daniel Kraft <d@domob.eu> * gfortran.dg/typebound_generic_1.f03: Change so that no error is expected on already erraneous symbol (renamed to fresh one). From-SVN: r146733
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index cab8f82..7e41535 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1784,19 +1784,19 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag)
gcc_assert (!tail || !tail->next);
gcc_assert (primary->expr_type == EXPR_VARIABLE);
- if (tbp->typebound->is_generic)
+ if (tbp->n.tb->is_generic)
tbp_sym = NULL;
else
- tbp_sym = tbp->typebound->u.specific->n.sym;
+ tbp_sym = tbp->n.tb->u.specific->n.sym;
primary->expr_type = EXPR_COMPCALL;
- primary->value.compcall.tbp = tbp->typebound;
+ primary->value.compcall.tbp = tbp->n.tb;
primary->value.compcall.name = tbp->name;
gcc_assert (primary->symtree->n.sym->attr.referenced);
if (tbp_sym)
primary->ts = tbp_sym->ts;
- m = gfc_match_actual_arglist (tbp->typebound->subroutine,
+ m = gfc_match_actual_arglist (tbp->n.tb->subroutine,
&primary->value.compcall.actual);
if (m == MATCH_ERROR)
return MATCH_ERROR;
@@ -1811,8 +1811,6 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag)
}
}
- gfc_set_sym_referenced (tbp->n.sym);
-
break;
}