diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-04 20:46:11 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-04 20:46:11 +0000 |
commit | c6a0599243068b33768268296b067d0fce5feec9 (patch) | |
tree | df679370a76da565ff23a0cbbdd8f61a1c342b7f /gcc/fortran/module.c | |
parent | 6f10d649d09627cab1f7cd2162d6bec28e588a9e (diff) | |
download | gcc-c6a0599243068b33768268296b067d0fce5feec9.tar.gz |
2007-08-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31214
* symbol.c (get_unique_symtree): Moved from module.c.
* module.c (get_unique_symtree): Moved to symbol.c.
* decl.c (get_proc_name): Transfer the typespec from the local
symbol to the module symbol, in the case that an entry is also
a module procedure. Ensure the local symbol is cleaned up by
pointing to it with a unique symtree.
* dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
2007-08-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31214
* gfortran.dg/entry_13.f90: New test.
* gfortran.dg/entry_12.f90: Clean up .mod file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index fc30eae7732..baba5c7434c 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -1822,20 +1822,6 @@ mio_charlen (gfc_charlen **clp) } -/* Return a symtree node with a name that is guaranteed to be unique - within the namespace and corresponds to an illegal fortran name. */ - -static gfc_symtree * -get_unique_symtree (gfc_namespace *ns) -{ - char name[GFC_MAX_SYMBOL_LEN + 1]; - static int serial = 0; - - sprintf (name, "@%d", serial++); - return gfc_new_symtree (&ns->sym_root, name); -} - - /* See if a name is a generated name. */ static int @@ -2287,7 +2273,7 @@ mio_symtree_ref (gfc_symtree **stp) if (in_load_equiv && p->u.rsym.symtree == NULL) { /* Since this is not used, it must have a unique name. */ - p->u.rsym.symtree = get_unique_symtree (gfc_current_ns); + p->u.rsym.symtree = gfc_get_unique_symtree (gfc_current_ns); /* Make the symbol. */ if (p->u.rsym.sym == NULL) @@ -3418,7 +3404,7 @@ read_cleanup (pointer_info *p) { /* Add hidden symbols to the symtree. */ q = get_integer (p->u.rsym.ns); - st = get_unique_symtree ((gfc_namespace *) q->u.pointer); + st = gfc_get_unique_symtree ((gfc_namespace *) q->u.pointer); st->n.sym = p->u.rsym.sym; st->n.sym->refs++; @@ -3598,7 +3584,7 @@ read_module (void) /* Create a symtree node in the current namespace for this symbol. */ st = check_unique_name (p) - ? get_unique_symtree (gfc_current_ns) + ? gfc_get_unique_symtree (gfc_current_ns) : gfc_new_symtree (&gfc_current_ns->sym_root, p); st->ambiguous = ambiguous; |