------- Comment #7 from dir at lanl dot gov  2005-12-12 16:37 -------
This patch works for the reduced test case, but the original test case still
fails for me -


[dranta:~/tests/gfortran-D] dir% gfortran -o write08 write08.f
[dranta:~/tests/gfortran-D] dir% write08
[dranta:~/tests/gfortran-D] dir% cat write08.f
      integer :: i = 1
      open(11,status="replace",form="unformatted")
      write(11) dat
      read(11,end=1008) i
1008  continue
      backspace 11
      backspace 11
      backspace 11
      end

[dranta:~/tests/gfortran-D] dir% gfortran -o testio2 testio2.f
[dranta:~/tests/gfortran-D] dir% testio2
At line 72 of file testio2.f
Fortran runtime error: Invalid argument
[dranta:~/tests/gfortran-D] dir% cat testio2.f
      program test
      dimension data(100)
       read(11,end=        1000 )data
 1000  continue
       backspace 11
       backspace 11
       backspace 11
       read(11,end=        1001 )data
 1001  continue
       backspace 11
       rewind 11
       backspace 11
       backspace 11
       backspace 11
       rewind 11
       write(11)data
       backspace 11
       backspace 11
       backspace 11
       backspace 11
       backspace 11
       backspace 11
       rewind 11
       backspace 11
       write(11)data
       write(11)data
       write(11)data
       backspace 11
       read(11,end=        1002 )data
 1002  continue
       backspace 11
       rewind 11
       backspace 11
       read(11,end=        1003 )data
 1003  continue
       write(11)data
       write(11)data
       write(11)data
       rewind 11
       read(11,end=        1004 )data
 1004  continue
       rewind 11
       rewind 11
       read(11,end=        1005 )data
 1005  continue
       backspace 11
       write(11)data
       backspace 11
       rewind 11
       backspace 11
       rewind 11
       read(11,end=        1006 )data
 1006  continue
       rewind 11
       write(11)data
       backspace 11
       read(11,end=        1007 )data
 1007  continue
       read(11,end=        1008 )data
 1008  continue
       backspace 11
       read(11,end=        1009 )data
 1009  continue
       backspace 11
       write(11)data
       backspace 11
       read(11,end=        1010 )data
 1010  continue
       read(11,end=        1011 )data
 1011  continue
       backspace 11
       backspace 11
      stop
      end
[dranta:~/tests/gfortran-D] dir% gfortran --v
Using built-in specs.
Target: powerpc-apple-darwin8.3.0
Configured with: ./configure --prefix=/Users/dir/gfortran
--enable-languages=c,f95
Thread model: posix
gcc version 4.2.0 20051212 (experimental)
[dranta:~/tests/gfortran-D] dir% 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139

Reply via email to