From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23292 invoked by alias); 9 Jan 2011 18:56:00 -0000 Received: (qmail 23283 invoked by uid 22791); 9 Jan 2011 18:56:00 -0000 X-SWARE-Spam-Status: No, hits=-2.9 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; Sun, 09 Jan 2011 18:55:56 +0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/42418] PROCEDURE: Rejects interface which is both specific and generic procedure 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: janus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Sun, 09 Jan 2011 19:07: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-01/txt/msg00841.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D42418 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.01.09 18:55:46 Ever Confirmed|0 |1 --- Comment #3 from janus at gcc dot gnu.org 2011-01-09 18:55:46 UTC --- (In reply to comment #0) > gfortran rejects the following program where "gen" is both a generic and a > specific procedure name as interface argument to PROCEDURE. I cannot find= a > reason why it should be invalid and thus I think it is valid. >=20 >=20 > procedure(gen) :: f > 1 > Error: Interface 'gen' at (1) may not be generic The behavior in comment #0 I can confirm. And I agree that it is valid. Cha= pter 16.3.1 of F08 says: "Within its scope, a local identi=EF=AC=81er of one class shall not be the = same as another local identi=EF=AC=81er of the same class, except that a generic na= me may be the same as the name of a procedure as explained in 12.4.3.4 [...]" In 12.4.3.4.1 we find: "A generic name is a generic identi=EF=AC=81er that refers to all of the pr= ocedure names in the interface block. A generic name may be the same as any one of = the procedure names in the interface block, or the same as any accessible gener= ic name."