This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15755] New: gfortran: backspace call causes bus error
- From: "amor at eos dot ubc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 May 2004 22:55:11 -0000
- Subject: [Bug fortran/15755] New: gfortran: backspace call causes bus error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
OS: Freebsd 5.2.1-RELEASE-p4
G95 snapshot version: gcc-3.5-20040530
gfortran: backspace call causes bus error
The problem was reported fixed(may24) at the www.g95.org site but has
not shown up here.
------ Test program
program test2
c
integer nin
character*72 dummy1, dummy2, section_header
c
nin=10
section_header="global control parameters"
open(nin,file='cpu.dat',status='old')
c rewind unit nout from previous read-procedure in main routine
rewind nin
write(6,*) nin
c read and write procedure
100 continue
read(nin,*,end=400) dummy1
write(6,*) dummy1
if (dummy1.eq.section_header) then
write(6,*) " found header"
200 continue
read(nin,*) dummy1
write(6,*) "d1 ",dummy1
c appears with these two lines one gets a Bus error
backspace(nin)
read(nin,'(a)') dummy2
c write(6,*) "d2 ",dummy2
c
if (dummy1(1:4).eq.'done') then
write(6,*) "got done "
rewind nin
goto 400
endif
goto 200
endif
goto 100
400 continue
write(6,*) " finished "
write(6,*) dummy1
stop
end
---------------(cpu.dat file)
'global control parameters'
'north haven tce oxidation'
.true. ;varsat_flow
.false. ;steady_flow
.false. ;fully_saturated
.true. ;reactive_transport
'density dependent flow'
'done'
--
Summary: gfortran: backspace call causes bus error
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amor at eos dot ubc dot ca
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15755