From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 461 invoked by alias); 25 May 2008 15:37:42 -0000 Received: (qmail 306 invoked by uid 48); 25 May 2008 15:36:59 -0000 Date: Sun, 25 May 2008 15:37:00 -0000 Message-ID: <20080525153659.305.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/msg01859.txt.bz2 ------- Comment #3 from burnus at gcc dot gnu dot org 2008-05-25 15:36 ------- > Ok, this produces an impressive list of regressions. > Many of those (e.g. actual_procedure_1.f90) seem to be related to > conf (external, dimension); /* See Fortran 95's R504. */ > I'm not sure if the constraint from R504 is implemented correctly here, or if > it constrains too much. As written, I believe that R504 entity-decl is object-name [( array-spec )] [ * char-length ] [initialization ] or function-name [ * char-length ] only restricts the use of: REAL, EXTERNAL :: func(10) °°°°<- array-spec, invalid for function names but not (a) REAL, EXTERNAL, DIMENSION(10) :: func nor (b) the dimension of function results. Despite my failure to find anything in the standard which rejects (a) all my compilers reject it whereas all my compilers allow (b). See also: http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bb371413b5cbe3d7 > Others testcases (like argument_checking_3.f90) fail because they define lots > of specific interfaces, but no external implementation for those. > So I guess they are actually invalid? As I did not apply your patch, I fail to understand this problem. Ignoring the problems with the rank mismatches and too few arguments, the program is valid from the Fortran side. External means that the user somehow needs to provide the foo,bar,foobar procedures, but that is outside of the scope of the Fortran standard (except that also Fortran procedures can be external procedures). In case of gfortran the linker would complain - but it should never reach that point because of the compile-time errors. By the way: The the rank mismatch dg-error and not dg-warning should be used in argument_checking_3.f90. (However, dejagnu does not distingish.) -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-05-25 15:36:59 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36325