diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-13 21:02:00 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-13 21:02:00 +0000 |
commit | eb4a5c3e8794a4ce13f4e85730765f62ab35d4fb (patch) | |
tree | 3f83c824eeb73cf13412e3276dbd038231c3b913 /gcc/fortran | |
parent | c723595ccc885d916282381fcbea0c34b669d784 (diff) | |
download | gcc-eb4a5c3e8794a4ce13f4e85730765f62ab35d4fb.tar.gz |
2007-08-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32926
* match.c (gfc_match_call): Do not create a new symtree in the
case where the existing symbol is external and not referenced.
2007-08-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32926
* gfortran.dg/external_procedures_3.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127398 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/match.c | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 26a0cd2b7f2..b6edba44b40 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2007-08-13 Paul Thomas <pault@gcc.gnu.org> + PR fortran/32926 + * match.c (gfc_match_call): Do not create a new symtree in the + case where the existing symbol is external and not referenced. + +2007-08-13 Paul Thomas <pault@gcc.gnu.org> + PR fortran/32827 * decl.c (variable_decl): Check for an imported symbol by looking for its symtree and testing for the imported diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 39e39af29a6..5f56948e0f6 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2333,13 +2333,16 @@ gfc_match_call (void) if (!sym->attr.generic && !sym->attr.subroutine) { - /* ...create a symbol in this scope... */ - if (sym->ns != gfc_current_ns - && gfc_get_sym_tree (name, NULL, &st) == 1) - return MATCH_ERROR; + if (!(sym->attr.external && !sym->attr.referenced)) + { + /* ...create a symbol in this scope... */ + if (sym->ns != gfc_current_ns + && gfc_get_sym_tree (name, NULL, &st) == 1) + return MATCH_ERROR; - if (sym != st->n.sym) - sym = st->n.sym; + if (sym != st->n.sym) + sym = st->n.sym; + } /* ...and then to try to make the symbol into a subroutine. */ if (gfc_add_subroutine (&sym->attr, sym->name, NULL) == FAILURE) |