From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28833 invoked by alias); 21 Jul 2012 17:10:49 -0000 Received: (qmail 28822 invoked by uid 22791); 21 Jul 2012 17:10:49 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED 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, 21 Jul 2012 17:10:34 +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 Date: Sat, 21 Jul 2012 17:10:00 -0000 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: 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" MIME-Version: 1.0 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: 2012-07/txt/msg01710.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42418 --- Comment #7 from janus at gcc dot gnu.org 2012-07-21 17:10:32 UTC --- (In reply to comment #6) > However, I wonder whether this whole generic check does not come to early. If > the generic interface is declared after the PROCEDURE statement, it will not be > triggered. It should probably be moved to resolve.c Along this line: module mod procedure(gen) :: f interface gen module procedure spec end interface gen contains subroutine spec() end subroutine end module This is rejected with: procedure(gen) :: f 1 Error: Interface 'gen' of procedure 'f' at (1) must be explicit I'm not sure if this error message is correct. In any case, it is accepted if 'spec' is used as an interface in the PROCEDURE declaration (which seems inconsistent).