From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17285 invoked by alias); 20 Jul 2011 09:31:28 -0000 Received: (qmail 17276 invoked by uid 22791); 20 Jul 2011 09:31:28 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,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; Wed, 20 Jul 2011 09:31:14 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/49791] [4.4/4.5/4.6/4.7 Regression] Formatted namelist reads fails with: Cannot match namelist object X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.7 X-Bugzilla-Changed-Fields: Status Keywords Last reconfirmed CC Ever Confirmed Summary Target Milestone 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 Date: Wed, 20 Jul 2011 09:31: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: 2011-07/txt/msg01641.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49791 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |wrong-code Last reconfirmed| |2011.07.20 09:30:41 CC| |burnus at gcc dot gnu.org, | |jvdelisle at gcc dot | |gnu.org Ever Confirmed|0 |1 Summary|[4.6 Regression] Formatted |[4.4/4.5/4.6/4.7 |namelist reads of arrays |Regression] Formatted |don't work |namelist reads fails with: | |Cannot match namelist | |object Target Milestone|--- |4.4.7 --- Comment #1 from Tobias Burnus 2011-07-20 09:30:41 UTC --- CONFIRMED. * * * Note: The format is not standard conform. Issues: "$" vs "&", "$end" vs "/". However, the real problem is: xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40, instead of (working) xpos(1:5)= 0.00, 0.10, 0.20, 0.30, 0.40, or xpos= 0.00, 0.10, 0.20, 0.30, 0.40, or xpos(:)= 0.00, 0.10, 0.20, 0.30, 0.40, or xpos(1:)= 0.00, 0.10, 0.20, 0.30, 0.40, or ... Thus, the workaround is to fix the array bounds in the namelist file. Note: The program works with ifort, g95, pathf95, openf95, pgf90; it fails with the pedantic NAG - and (this PR) with the current gfortran versions. * * * Working: (4.6 trunk) 2010-09-28-r164677 gcc-4.5-2010-07-23-r162436 Failing: 4.7 trunk: current, 2011-05-10, 2011-05-28-r174379 gcc-4.5-x86_64-2010-11-13-r166693 Combining the 4.6/4.7 and the 4.5 data, I think the following patch is the culprit. As it has been back-ported to 4.4/4.5, I have now adapted the summary. When we know how obvious the patch is, we can still adjust the target milestone - currently it is 4.4.7. Author: jvdelisle Date: Tue Oct 26 19:05:08 2010 New Revision: 165979 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165979 Log: 2010-10-26 Jerry DeLisle PR libgfortran/46010 * io/list_read.c (nml_parse_qualifier): Add additional conditions for setting the end index for loop specification. Fix some whitespace. * io/write.c (write_default_char4): Const-ify the source argument. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/list_read.c trunk/libgfortran/io/write.c