This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25139] "Invalid argument" error on I/O
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2005 12:12:42 -0000
- Subject: [Bug libfortran/25139] "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 #2 from fxcoudert at gcc dot gnu dot org 2005-11-29 12:12 -------
Well, since it relies on uninitialized variables, it's a bit hard to reproduce.
The following code (I believe it is legal) reproducibly fails for me on
i686-linux:
integer dat(5)
dat = (/ 0, 0, 0, 0, 18651460 /)
write(11) dat,dat,dat
rewind 11
write(11) dat,dat,dat,dat
rewind 11
write(11) dat
rewind 11
write(11) dat
rewind 11
read(11) dat
read(11,end=1008) dat
1008 continue
backspace 11
write(11) dat
backspace 11
read(11) dat
read(11,end=1011) dat
1011 continue
backspace 11
backspace 11
end
I think it has to do with array transfer, and overwriting the record markes
with data. Adding Janne in CC list for opinion.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org,
| |fxcoudert at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC host triplet|powerpc-apple-darwin8.3.0 |
Last reconfirmed|0000-00-00 00:00:00 |2005-11-29 12:12:42
date| |
Summary|Fortran runtime error: |"Invalid argument" error on
|Invalid argument |I/O
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139