From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27301 invoked by alias); 15 Nov 2009 10:43:40 -0000 Received: (qmail 27279 invoked by uid 48); 15 Nov 2009 10:43:26 -0000 Date: Sun, 15 Nov 2009 10:43:00 -0000 Message-ID: <20091115104326.27278.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42048] [F03] Erroneous syntax error message on TBP call In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg01214.txt.bz2 ------- 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