From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18724 invoked by alias); 7 Mar 2007 04:46:03 -0000 Received: (qmail 18675 invoked by uid 48); 7 Mar 2007 04:45:48 -0000 Date: Wed, 07 Mar 2007 04:46:00 -0000 Message-ID: <20070307044548.18674.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/31052] Bad IOSTAT values when readings NAMELISTs past EOF In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" 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: 2007-03/txt/msg00444.txt.bz2 ------- Comment #12 from jvdelisle at gcc dot gnu dot org 2007-03-07 04:45 ------- The garbled text is because gfortran does not default initialize variable as some compilers do. The 'line' variable is not getting read because gfortran is getting an error on the read, so the it is not set to anything. Put a: line="" at the top of the subroutine to get around that. After this you can see that IOS is set to -1, so 'line' is not read. I am now going to study the REWIND and BACKSPACE and see what we should be doing differently if anything. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31052