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: 22 Dec 2005 14:18:10 -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 #21 from dir at lanl dot gov 2005-12-22 14:18 -------
The second example in comment 3 should fail as it does - since it does try read
beyond the end of file. As far as I can tell, the FX patch does not fix any of
the test cases on the Macintosh and I think that it actually is incorrect. It
should actually read -
new = file_position (u->s) - m - 2*sizeof (gfc_offset);
as "2*sizeof (gfc_offset)" is the size of the green words before and after the
data and m is the size of the data. (m+2*sizeof (gfc_offset)) is the total size
of the binary record that is being skipped backwards over.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139