OSDN Git Service

2009-01-10 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / resolve.c
index 74f8fb0..3148b0d 100644 (file)
@@ -1,5 +1,5 @@
 /* Perform type resolution on the various structures.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    Contributed by Andy Vaught
 
@@ -4313,7 +4313,7 @@ check_host_association (gfc_expr *e)
   if (gfc_current_ns->parent
        && old_sym->ns != gfc_current_ns)
     {
-      gfc_find_symbol (old_sym->name, gfc_current_ns, 1, &sym);
+      gfc_find_symbol (e->symtree->name, gfc_current_ns, 1, &sym);
       if (sym && old_sym != sym
              && sym->ts.type == old_sym->ts.type
              && sym->attr.flavor == FL_PROCEDURE
@@ -9247,6 +9247,7 @@ resolve_symbol (gfc_symbol *sym)
      module function and is not PRIVATE.  */
   if (sym->ts.type == BT_DERIVED
        && sym->ts.derived->attr.use_assoc
+       && sym->ns->proc_name
        && sym->ns->proc_name->attr.flavor == FL_MODULE)
     {
       gfc_symbol *ds;