This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25835] Segfault or Bad Address error on unformatted sequential READ
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2006 07:45:32 -0000
- Subject: [Bug libfortran/25835] Segfault or Bad Address error on unformatted sequential READ
- References: <bug-25835-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2006-01-22 07:45 -------
In the following case, the second read is failing to read anything and gives no
error, giving the impression that it is working if you don't look at the data.
Works for data size of 2044 or less. This bug is ugly. Works fine if you get
rid of the first read, which leads me to believe we are not cleaning up
correctly after an end error condition. (I have been down more than one trail
on this already so who knows) :)
integer data(2045)
data=5
open(unit=11,form='unformatted')
write(11)data
read(11,end= 1000 )data
call abort()
1000 continue
backspace 11
backspace 11
data = 0
read(11)data
print *, data
close(11)
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25835