From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10854 invoked by alias); 14 Oct 2010 18:16:20 -0000 Received: (qmail 10842 invoked by uid 22791); 14 Oct 2010 18:16:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Oct 2010 18:16:04 +0000 From: "marco at hulten dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46010] I/O: Namelist-reading bug 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: marco at hulten dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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 Date: Thu, 14 Oct 2010 18:16:00 -0000 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-10/txt/msg01222.txt.bz2 Message-ID: <20101014181600.ULxjHTijYNqvqhP9YDGobpsKzLwb2T-o_y-O9iyNDIs@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46010 --- Comment #5 from Marco van Hulten 2010-10-14 18:15:59 UTC --- (In reply to comment #4) > [...] > The issue is really the ".true." ("T","true", ".false.", "F", "false"). If the > last item (in the namelist and in the derived type) is an integer or a string > it works. No, that doesn't seem to be the issue. I tried both your minimal test case as well as my test case, with an added character as well as an added number, but all give the following result: marco@graviton testje $ gfortran -std=f2003 test.f90 marco@graviton testje $ ./a.out &NAMTOPTRC TRACER(1)%SNAME="Aa", TRACER(1)%LINI=T, TRACER(1)%GETAL= 1, TRACER(2)%SNAME="Bb", TRACER(2)%LINI=T, TRACER(2)%GETAL= 1, TRACER(3)%SNAME="Cc", TRACER(3)%LINI=T, TRACER(3)%GETAL= 1, / marco@graviton testje $ gfortran test.f90 marco@graviton testje $ ./a.out At line 13 of file test.f90 (unit = 99, file = 'nml.dat') Fortran runtime error: Bad data for namelist object tracer%getal