diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 13f68ab8c65..153dfdb3073 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1,5 +1,5 @@ /* Matching subroutines in all sizes, shapes and colors. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Andy Vaught @@ -2901,12 +2901,9 @@ done: static match match_typebound_call (gfc_symtree* varst) { - gfc_symbol* var; gfc_expr* base; match m; - var = varst->n.sym; - base = gfc_get_expr (); base->expr_type = EXPR_VARIABLE; base->symtree = varst; @@ -2975,7 +2972,8 @@ gfc_match_call (void) /* If this is a variable of derived-type, it probably starts a type-bound procedure call. */ - if ((sym->attr.flavor != FL_PROCEDURE || sym == gfc_current_ns->proc_name) + if ((sym->attr.flavor != FL_PROCEDURE + || gfc_is_function_return_value (sym, gfc_current_ns)) && (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)) return match_typebound_call (st); |