From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24284 invoked by alias); 12 Feb 2011 09:03:56 -0000 Received: (qmail 24273 invoked by uid 22791); 12 Feb 2011 09:03:54 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Sat, 12 Feb 2011 09:03:50 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47710] New: [OOP] Improve ambiguity check for TBP X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: accepts-invalid 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: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 12 Feb 2011 09:32: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: 2011-02/txt/msg01495.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47710 Summary: [OOP] Improve ambiguity check for TBP Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org CC: janus@gcc.gnu.org http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/9a2837d8aee4e38c There is potentially a problem with the ambiguity check for TBP of the form procedure, nopass :: baseproc_nopass => baseproc procedure, pass :: baseproc_pass => baseproc That is: Both TBP point to the same procedure, though through the PASS and NOPASS they should be distinguishable. It is a bit unclear whether this is valid - also Richard Maine is confused ;-) One might want to ask at J3 - maybe up to an interpretation request. * * * Janus' example (cf. also below) should be truly ambiguous: module mod type base_t contains procedure, nopass :: baseproc_nopass => baseproc1 procedure, pass :: baseproc_pass => baseproc2 generic :: some_proc => baseproc_pass, baseproc_nopass end type contains subroutine baseproc1 (this) class(base_t) :: this print *, 'baseproc1' end subroutine subroutine baseproc2 (this,that) class(base_t) :: this, that print *, 'baseproc2' end subroutine end module program p use mod type(base_t) :: t call t%some_proc(t) ! ambiguous!!! end program