From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 699 invoked by alias); 28 Jul 2005 09:06:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 684 invoked by uid 48); 28 Jul 2005 09:06:29 -0000 Date: Thu, 28 Jul 2005 09:07:00 -0000 Message-ID: <20050728090629.683.qmail@sourceware.org> From: "erik dot edelmann at iki dot fi" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050307183348.20363.paulthomas2@wanadoo.fr> References: <20050307183348.20363.paulthomas2@wanadoo.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/20363] interface body has incorrect scope X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg03673.txt.bz2 List-Id: ------- Additional Comments From erik dot edelmann at iki dot fi 2005-07-28 09:06 ------- (In reply to comment #12) > > > interfaces. This brings me to a question: what is a "named interface"? I > > This is a nameless interface, isn't it? > > module snafu > interface > subroutine really_snafu (foo) > integer, intent (inout) :: foo > end subroutine really_snafu > end interface > end module snafu > > This compiles correctly with gfc. A named interface, therefore, is the same > thing but with a name. I don't know what this does for us. A generic > interface, is a named interface that contains variants for different types. I did som checking ... The (draft) f2k standard apperantly considers interfaces with names to be generic interfaces, even when the interface block contains only one procedure. This view also agres with the sources of g95 and gfortran; we have 4 different types of interfaces (defined in gfortran.h): typedef enum { INTERFACE_NAMELESS=1, INTERFACE_GENERIC, INTERFACE_INTRINSIC_OP, INTERFACE_USER_OP } inteface_type; The only one of these that can have a name is INTERFACE_GENERIC, which is treated as "nameless" in find_special() by g95. This means that either find_special() is meaningless in g95, or g95 has a bug. In the latter case, we would most likely introduce the same bug in gfortran with my patch. I'm, however, becoming more and more convinced that find_special() is meaningless (in both compilers) (but I'm not 100 % sure of course). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20363