From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7070 invoked by alias); 29 Sep 2010 16:17:38 -0000 Received: (qmail 7050 invoked by uid 22791); 29 Sep 2010 16:17:36 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Sep 2010 16:17:32 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45836] [OOP] Fortran 2003 - Type Bound Procedure Error - Type Mismatch X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords CC Summary In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 29 Sep 2010 20:43:00 -0000 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: 2010-09/txt/msg03142.txt.bz2 Message-ID: <20100929204300.zhowesTyP0ooefJwHlCTJ26Z_bY3ERMKSrm3iGWb0wo@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45836 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |janus at gcc dot gnu.org Summary|Fortran 2003 - Type Bound |[OOP] Fortran 2003 - Type |Procedure Error - Type |Bound Procedure Error - |Mismatch |Type Mismatch --- Comment #1 from Tobias Burnus 2010-09-29 16:17:30 UTC --- The problem is that the name of the module procedure is the same for both TBP; that's valid but seemingly does not work. Variant A: Without use-associating the ambiguous "sizeReturn" the program works: use A, only: a_type use B, only: b_type Variant B: Only importing one of the "sizeReturn" also works: use A, only: a_type use B, only: b_type, sizeReturn or use A, only: a_type use B However, using just use A use B or even use A, only: a_type, sizeReturn use B, only: b_type, sizeReturn does not. (This use associates both "sizeReturn", which is valid as long as one does use "sizeReturn"; if one would use the symbol, it's an error as the symbol is ambiguous.)