http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45841
--- Comment #26 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2010-10-05
18:45:52 UTC ---
(In reply to comment #24)
> Did I follow the wrong process for deleting the file?
No, the commit was fine, it's the "svn diff" that fails.
(In reply to comment #25)
> A putback at the beginning will attempt a backwards seek, though, which is
> exactly what you're looking at fixing.
But... again, this is with the *fixed* simulator.
Whatever: I had a look and the difference is:
(unfixed simulator)
open("filebuf_virtuals-1.txt", O_RDONLY|O_NONBLOCK) = 4
lseek(4, 4294967295, SEEK_CUR) = 4294967295
read(4, "", 1023) = 0
close(4) = 0
(return with 0)
(fixed simulator)
open("filebuf_virtuals-1.txt", O_RDONLY|O_NONBLOCK) = 4
lseek(4, -1, SEEK_CUR) = -1 EINVAL (Invalid argument)
read(4, "// 990117 bkoz\n// test functiona"..., 1023) = 1023
close(4) = 0
write(2, "assertion \"", 11assertion ") = 11
(failed assertion)
On a host (using gcc-4.4.3 and library), I don't get to the "read":
open("filebuf_virtuals-1.txt", O_RDONLY) = 3
lseek(3, -1, SEEK_CUR) = -1 EINVAL (Invalid argument)
close(3) = 0
So, it's (error/EOF) file state state that's lost; looks like I have to amend
the check_v3_target_fileio some more and fix another simulator bug. Film at
11.