From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18603 invoked by alias); 25 Oct 2010 05:48:23 -0000 Received: (qmail 18589 invoked by uid 22791); 25 Oct 2010 05:48:22 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID,TW_JV 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; Mon, 25 Oct 2010 05:48:17 +0000 From: "jvdelisle at gcc dot gnu.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: jvdelisle at gcc dot gnu.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: Mon, 25 Oct 2010 05:48: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/msg02057.txt.bz2 Message-ID: <20101025054800.KG6TNSrBjM011BJLXAnMrUTMpsTIogHdcQSjOZXyscM@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46010 --- Comment #7 from Jerry DeLisle 2010-10-25 05:47:58 UTC --- Here is a patch. Please try this if you can. Index: list_read.c =================================================================== --- list_read.c (revision 165900) +++ list_read.c (working copy) @@ -2105,8 +2105,9 @@ nml_parse_qualifier (st_parameter_dt *dtp, descrip /* If -std=f95/2003 or an array section is specified, do not allow excess data to be processed. */ - if (is_array_section == 1 - || !(compile_options.allow_std & GFC_STD_GNU)) + if (is_array_section == 1 + || !(compile_options.allow_std & GFC_STD_GNU) + || !dtp->u.p.ionml->touched) ls[dim].end = ls[dim].start; else dtp->u.p.expanded_read = 1;