The program runs with out problem with g77, but fails with gfortran -

[EMAIL PROTECTED] /d/Docume~1/rantad/mydocu~1/tests
$ g77 -o write01 write01.f

[EMAIL PROTECTED] /d/Docume~1/rantad/mydocu~1/tests
$ write01

[EMAIL PROTECTED] /d/Docume~1/rantad/mydocu~1/tests
$ gfortran -o write01 write01.f

[EMAIL PROTECTED] /d/Docume~1/rantad/mydocu~1/tests
$ write01
At line 13 of file write01.f
Fortran runtime error: Invalid argument

[EMAIL PROTECTED] /d/Docume~1/rantad/mydocu~1/tests
$ gfortran --v
Using built-in specs.
Target: i686-pc-mingw32
Configured with: ../gcc/configure --prefix=/mingw --enable-languages=c,f95
--with-gmp=/home/FX/local/ --with-mpfr=/home/FX/local
Thread model: win32
gcc version 4.1.0 20050805 (experimental)

[EMAIL PROTECTED] /d/Docume~1/rantad/mydocu~1/tests
$ cat write01.f
      program main
      implicit real*8 (a-h,o-z)
      common /ioline/ n
      common /iodatac/ cmmnd(52)
      character*16 cmmnd
      dimension xx(52)
      ntape=3
      do 10 n=1,10
      write (ntape) n,xx,cmmnd
   10 continue
      rewind ntape
      do 15 i=1,10
      read (ntape,end=20) n,xx,cmmnd
   15 continue
   20 continue
      stop
      end
[dranta:~/tests/gfortran-D] dir%

-- 
           Summary: [mingw32] Fortran runtime I/O error on correct program
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-mingw32


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

Reply via email to