diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-10-18 12:48:37 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-10-18 12:48:37 +0000 |
commit | a944c79a88afb91706e4b29db4224981fe0c91eb (patch) | |
tree | ec5ef02923b8c25783183f624b111244cb04dff8 /gcc/fortran/resolve.c | |
parent | a7f638eca471ae667d2aea8d634869d1f0809887 (diff) | |
download | gcc-a944c79a88afb91706e4b29db4224981fe0c91eb.tar.gz |
re PR fortran/33233 (Parent and contained procedure: Wrongly treated as generic procedures)
2007-10-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33233
* resolve.c (check_host_association): Check singly contained
namespaces and start search for symbol in current namespace.
2007-10-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33233
* gfortran.dg/host_assoc_function_1.f90: Correct references.
* gfortran.dg/host_assoc_function_3.f90: New test.
From-SVN: r129437
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index f16fe281772..dffa76e0cff 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4014,11 +4014,12 @@ check_host_association (gfc_expr *e) return retval; if (gfc_current_ns->parent - && gfc_current_ns->parent->parent && old_sym->ns != gfc_current_ns) { - gfc_find_symbol (old_sym->name, gfc_current_ns->parent, 1, &sym); - if (sym && old_sym != sym && sym->attr.flavor == FL_PROCEDURE) + gfc_find_symbol (old_sym->name, gfc_current_ns, 1, &sym); + if (sym && old_sym != sym + && sym->attr.flavor == FL_PROCEDURE + && sym->attr.contained) { temp_locus = gfc_current_locus; gfc_current_locus = e->where; |