------- Comment #1 from janus at gcc dot gnu dot org  2009-11-15 10:43 -------
The following patch makes the test case compile:

Index: gcc/fortran/match.c
===================================================================
--- gcc/fortran/match.c (revision 154106)
+++ gcc/fortran/match.c (working copy)
@@ -2975,7 +2975,7 @@ 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
+  if ((sym->attr.flavor != FL_PROCEDURE || sym == gfc_current_ns->proc_name)
       && (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS))
     return match_typebound_call (st);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42048

Reply via email to