From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18229 invoked by alias); 30 Mar 2013 10:18:32 -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 Received: (qmail 18168 invoked by uid 48); 30 Mar 2013 10:18:19 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces Date: Sat, 30 Mar 2013 10:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-03/txt/msg02243.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786 Bug #: 56786 Summary: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org CC: jvdelisle@gcc.gnu.org, tiloschwarz@gcc.gnu.org Blocks: 56744 Split off from PR 52512. The following program runs successfully with GCC 4.1, 4.3 and 4.5, but it fails with GCC 4.6 to GCC 4.9. It also works with Crayftn, PGI and ifort. The problem is the space in "i(3 )=". Strictly speaking, that is invalid but as it worked before, others support it as well, and as ignoring spaces in "name(...)" is nonambiguous, I believe that we should support it. (F2008, "10.11.2 Name-value subsequences", paragraph 2 has: "Each designator may be preceded and followed by one or more optional blanks but shall not contain embedded blanks.") integer :: i(3) namelist /nml/ i i = -42 open(99,status='scratch') write(99,'(a)') '&nml i(3 ) = 5 /' rewind(99) read(99,nml=nml) close(99) write(*,nml=nml) if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort() end