From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3757 invoked by alias); 21 Dec 2005 19:36:30 -0000 Received: (qmail 3736 invoked by uid 48); 21 Dec 2005 19:36:28 -0000 Date: Wed, 21 Dec 2005 19:36:00 -0000 Message-ID: <20051221193628.3735.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/25139] [4.1/4.2 regression] "Invalid argument" error on I/O In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dir at lanl dot gov" 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: 2005-12/txt/msg02260.txt.bz2 List-Id: ------- Comment #14 from dir at lanl dot gov 2005-12-21 19:36 ------- After tracing the errors for a while, it became clean that "active" pointer into the read/write buffer was not being correctly updated. Adding one line ( s->active=0; ) to the bottom of routine "fd_truncate" in file "unix.c" fixes these errors. All the examples here run OK with this patch and I built 16 of my programs and ran their many test problems with no errors. I tried to run the fortran testsuite with "make check-gfortran", but check-gfortran is not in the makefile. It would be nice if just fortran testsuite could be run. *** unix.c Wed Dec 21 08:11:12 2005 --- unixoriginal.c Wed Dec 21 08:10:27 2005 *************** *** 601,608 **** } s->physical_offset = s->file_length = s->logical_offset; - - s->active=0; return SUCCESS; } --- 601,606 ---- -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139