Need interpretation
- From: Jerry DeLisle <jvdelisle@xxxxxxxxxxx>
- Date: Thu, 22 Dec 2005 22:58:38 GMT
Hi Folks,
Which is the correct behavior here?:
On i686-pc-linux-gnu:
$ cat back3.f
integer dat(5)
dat = (/ 0, 0, 0, 0, 1 /)
write(11) dat,dat,dat,dat
rewind 11
write(11) dat
read(11,end=1008) dat
call abort()
1008 continue
! backspace 11
! write(11) dat
read(11,end=1011) dat
print *, 'failed'
1011 continue
backspace 11
backspace 11
end$ gfc back3.f
$ ./a.out
At line 11 of file back3.f
Fortran runtime error: Read past ENDFILE record
$ ifc back3.f
$ ./a.out
$
gfortran and ifort give different results with those two lines commented out. I am trying to determine if I have a bug here or not.
Regards,
Jerry .
- Follow-Ups:
- Re: Need interpretation
- From: Ron Shepard
- Re: Need interpretation
- From: Richard E Maine
- Re: Need interpretation
- Prev by Date: Re: Syntax for passing an external function into a contained function?
- Next by Date: Re: Need interpretation
- Previous by thread: Scons to build F90, with mixed C. C++
- Next by thread: Re: Need interpretation
- Index(es):