From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10249 invoked by alias); 26 May 2008 20:34:52 -0000 Received: (qmail 10096 invoked by uid 48); 26 May 2008 20:34:09 -0000 Date: Mon, 26 May 2008 20:34:00 -0000 Message-ID: <20080526203409.10095.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/36325] specific or generic INTERFACE implies the EXTERNAL attribute In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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/msg01950.txt.bz2 ------- Comment #11 from burnus at gcc dot gnu dot org 2008-05-26 20:34 ------- > Moreover it includes another related bugfix (see PR35830 comment #2). Nice. If everything works, one should submit it, including new test cases. > Regarding Tobi's comment #7: > > interface > real function bar() > end function bar > end interface > dimension :: bar(4) > > Why would I need to reject this? At least it's compatible with > > conflict(external with implicit interface, dimension) > > because it has an explicit interface. > I think the problem is rather that the dimension statement contradicts > the interface statement, which says that 'bar' > returns a scalar real number (and not an array). I agree. Fortran 2003 states: "An interface body specifies all of the characteristics of the explicit specific interface or abstract interface." > g95's error message is: > Error: Attribute declaration of 'bar' at (1) is outside of the INTERFACE body Same with NAG f95: Error: Dimensions specified for BAR outside its INTERFACE body ifort has: "Error: This name has already been used as an external procedure name. [BAR]" > So I guess it is indeed invalid (and accepted by gfortran), but this seems to > be unrelated to this PR (probably it deserves a separate PR). I agree that it can be an extra PR. Analogous problem for ALLOCATABLE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36325