From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16186 invoked by alias); 23 Apr 2006 02:05:18 -0000 Received: (qmail 15549 invoked by alias); 23 Apr 2006 02:05:09 -0000 Date: Sun, 23 Apr 2006 02:05:00 -0000 Message-ID: <20060423020509.15548.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays 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-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-04/txt/msg01939.txt.bz2 List-Id: ------- Comment #10 from jvdelisle at gcc dot gnu dot org 2006-04-23 02:05 ------- Subject: Bug 20257 Author: jvdelisle Date: Sun Apr 23 02:04:58 2006 New Revision: 113190 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113190 Log: 2006-04-22 Jerry DeLisle PR libgfortran/20257 * io/io.h: Add prototypes for get_internal_unit and free_internal_unit. * io/unit.c (get_internal_unit): Initialize unit number, not zero. (free_internal_unit): New function to consolidate freeing memory. (get_unit): Initialize internal_unit_desc to NULL when unit is external. * io/unix.c (mem_close): Check for not NULL before freeing memory. * io/transfer.c (read_block): Reset bytes_left and skip error if unit is preconnected and default record length is reached. (read_block_direct): Ditto. (write_block): Ditto. (write_buf): Ditto. (data_transfer_init): Only flush if not internal unit. (finalize_transfer): Ditto and delete code to free memory used by internal units. (st_read_done): Use new function - free_internal_unit. (st_write_done): Use new function - free_internal unit. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/io.h trunk/libgfortran/io/transfer.c trunk/libgfortran/io/unit.c trunk/libgfortran/io/unix.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257