From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4144 invoked by alias); 10 Mar 2009 23:32:45 -0000 Received: (qmail 4019 invoked by uid 48); 10 Mar 2009 23:32:33 -0000 Date: Tue, 10 Mar 2009 23:32:00 -0000 Subject: [Bug fortran/39427] New: Error on generic name equivalent to type name in same module X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "damian at rouson dot net" 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: 2009-03/txt/msg00711.txt.bz2 The Fortran 2003 standard Section C.1.6 allows a generic procedure to have the same name as a type , but gfotran gives "Error: DERIVED attribute of 'foo' conflicts with PROCEDURE attribute at (1)" on the following code: module foo_module type foo integer :: bar end type interface foo procedure constructor end interface contains type(foo) function constructor() constructor%bar = 1 end function end module I use this style throughout a textbook I'm writing because it seems like a natural way to extend the intrinsic structure constructor syntax. A more extensive example of this technique is also in Figure 17.1 of Metcalf, Reid & Cohen. Damian -- Summary: Error on generic name equivalent to type name in same module Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: damian at rouson dot net GCC build triplet: Using built-in specs. Target: i386-apple-darwin8.10.1 Configured GCC host triplet: Using built-in specs. Target: i386-apple-darwin8.10.1 Configured GCC target triplet: Using built-in specs. Target: i386-apple-darwin8.10.1 Configured http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39427