From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1455 invoked by alias); 9 Jul 2009 01:20:59 -0000 Received: (qmail 1351 invoked by alias); 9 Jul 2009 01:20:45 -0000 Date: Thu, 09 Jul 2009 01:20:00 -0000 Message-ID: <20090709012045.1350.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/40330] [4.5 Regression] incorrect IO 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: 2009-07/txt/msg00719.txt.bz2 ------- Comment #34 from jvdelisle at gcc dot gnu dot org 2009-07-09 01:20 ------- Subject: Bug 40330 Author: jvdelisle Date: Thu Jul 9 01:20:23 2009 New Revision: 149398 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149398 Log: 2009-07-08 Jerry DeLisle PR libfortran/40330 PR libfortran/40662 * io/io.h (st_parameter_dt): Define format_not_saved bit used to signal whether the parsed format data was previously saved. Used to determine if the current format data should be freed or not. * io/transfer.c (st_read_done): Use the format_not_saved bit. (st_write_done): Likewise. * io/format.c (parse_format_list): Add boolean pointer to arg list. This pointer is used to return status to the caller regarding whether it is safe to cache the parsed format data. Currently, if a FMT_STRING token is encounetered, it is not safe to cache. Also, added a local boolean variable to hold this information as recursive calls to parse_format_list are made. Remove previous save_format logic. (parse_format): Do not use the format caching facility if the current unit is an internal unit or if it is not safe to save parsed format data. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/format.c trunk/libgfortran/io/io.h trunk/libgfortran/io/transfer.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40330