From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6958 invoked by alias); 26 Mar 2013 10:08:13 -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 6494 invoked by uid 48); 26 Mar 2013 10:08:01 -0000 From: "madawilliams at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56735] New: Namelist Read Error with question marks Date: Tue, 26 Mar 2013 10:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: madawilliams at gmail dot com 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/msg01867.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56735 Bug #: 56735 Summary: Namelist Read Error with question marks Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: madawilliams@gmail.com Hi, This is my first ever bug report so apologies if i miss some vital piece of information. I have some legacy code which compiles and runs with versions of gfortran up to 4.5. However after this the code compiles and runs but the namelist is not read correctly. There is no IO errors but non of the variables are set to their respective values. I have managed to narrow this down to the fact that the legacy namelist has question marks in the namelist file outside of any data block. Below is a very simple code and namelist which shows this. If you remove the question mark from the name list the values are set, otherwise they are not. -test.f PROGRAM TEST INTEGER int1,int2,int3 NAMELIST /temp/ int1,int2,int3 OPEN (53,FILE='test.nam',STATUS='OLD', IOSTAT=istat) READ (53,temp) WRITE(*, temp) PRINT*, istat END PROGRAM -test.nam ? $temp int1=1 int2=2 int3=3 $END I understand this might be non standard formatting for the namelist file, but as I said it works with gfortran <4.6 so seems like a regression.