This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25697] libfortran - Segmentation fault/ Bad Address on unformatted read
- From: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2006 16:02:56 -0000
- Subject: [Bug libfortran/25697] libfortran - Segmentation fault/ Bad Address on unformatted read
- References: <bug-25697-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from dir at lanl dot gov 2006-01-11 16:02 -------
With a larger amount of data it only takes one write -
[dranta:~/tests/gfortran-D] dir% gfortran -o write22 write22.f
[dranta:~/tests/gfortran-D] dir% write22
Bus error
[dranta:~/tests/gfortran-D] dir% cat write22.f
integer data(10000)
do i = 1,10000
data(i)=-1
enddo
open(unit=11,status='scratch',form='unformatted')
data(1)=1
data(10000)=-1
write(11)data
read(11,end= 1000 )data
call abort()
1000 continue
backspace 11
backspace 11
read(11,end= 1001 )data
if(data(1).ne. 1.or.data(10000).ne. -1)then
call abort()
endif
1001 continue
read(11,end= 1002 )data
call abort()
1002 continue
close(11)
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25697