From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11031 invoked by alias); 9 Sep 2010 04:39:27 -0000 Received: (qmail 11004 invoked by uid 48); 9 Sep 2010 04:39:15 -0000 Date: Thu, 09 Sep 2010 04:39:00 -0000 Subject: [Bug fortran/45608] New: Bogus error about procedure attribute X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle 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: 2010-09/txt/msg01144.txt.bz2 This test case is invalid. It is rejected with an error message that is nonsense in this context. program test implicit none type line_struct integer :: width = 10 end type type symbol_struct integer :: typee = 10 end type type curve_struct type (line_struct) line type (symbol_struct) symbol end type type (curve_struct) curve namelist / params / curve ! open (1, file = 'test.nml') read (1, nml = params) print *, curve(1)%symbol%typee end program $ gfc -g test.f90 test.f90:20.17: namelist / params / curve 1 Error: PROCEDURE attribute conflicts with NAMELIST attribute in 'curve' at (1) Another example is: program test2 implicit none type line_struct integer :: width = 10 end type type symbol_struct integer :: typee = 10 end type type curve_struct type (line_struct) line type (symbol_struct) symbol end type type (curve_struct) curve print *, curve(1)%symbol%typee end program $ gfc -g test2.f90 /tmp/ccuBUha0.o: In function `test': /home/jerry/prs/pr45532/pr45532.f90:20: undefined reference to `curve_' collect2: ld returned 1 exit status -- Summary: Bogus error about procedure attribute Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jvdelisle at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45608