From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2201 invoked by alias); 25 May 2008 13:36:18 -0000 Received: (qmail 2089 invoked by uid 48); 25 May 2008 13:35:32 -0000 Date: Sun, 25 May 2008 13:36:00 -0000 Subject: [Bug fortran/36325] New: specific or generic INTERFACE implies the EXTERNAL attribute X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jaydub66 at gmail dot com" 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: 2008-05/txt/msg01854.txt.bz2 I think the following code is invalid: interface subroutine foo end subroutine end interface external foo Because the INTERFACE statement already specifies the EXTERNAL attribute, which is thus specified twice. This code *is* actually rejected (as of rev. 135859), but the error message is completely wrong: external :: foo 1 Error: EXTERNAL attribute conflicts with SUBROUTINE attribute at (1) (which it does *not* for this case) Quoting the Fortran 2003 standard (section 5.1.2.6): "The EXTERNAL attribute specifies that an entity is an external procedure, dummy procedure, procedure pointer, or block data subprogram. This attribute may also be specified by an EXTERNAL statement (12.3.2.2), a procedure-declaration-stmt (12.3.2.3) or an interface body that is not in an abstract interface block (12.3.2.1)." And further on in section 12.3.2.1: "An interface body in a generic or specific interface block specifies the EXTERNAL attribute and an explicit specific interface for an external procedure or a dummy procedure. If the name of the declared procedure is that of a dummy argument in the subprogram containing the interface body, the procedure is a dummy procedure; otherwise, it is an external procedure." -- Summary: specific or generic INTERFACE implies the EXTERNAL attribute Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jaydub66 at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36325