This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25139] [4.1/4.2 regression] "Invalid argument" error on I/O
- From: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2005 19:36:28 -0000
- Subject: [Bug libfortran/25139] [4.1/4.2 regression] "Invalid argument" error on I/O
- References: <bug-25139-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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