From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4782 invoked by alias); 29 Oct 2012 16:03:38 -0000 Received: (qmail 4709 invoked by uid 48); 29 Oct 2012 16:03:23 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55117] Programs fails to read namelist (contains derived types objects) Date: Mon, 29 Oct 2012 16:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-10/txt/msg02717.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55117 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |janus at gcc dot gnu.org --- Comment #3 from janus at gcc dot gnu.org 2012-10-29 16:03:22 UTC --- I can confirm that I see the error with 4.3, 4.7 and trunk. Slightly reduced test case: *************************** IMPLICIT NONE TYPE TC INTEGER :: E END TYPE TYPE TB TYPE(TC) :: C INTEGER :: D END TYPE INTEGER :: A TYPE(TB) :: B(1:10) NAMELIST /N/ A, B OPEN (4,FILE='NAMELIST') READ (4,NML=N) END *************************** &N A=12, B(1)%D=4 / *************************** What's funny is that the error e.g. depends on the presence of the component 'C', although it is not referenced in the namelist at all. Furthermore the error only occurs if 'A' is also in the namelist.