This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gfortran bug?


Hi,

for example ,in the file ess_bin.f90

      program ess
      real*4 xlon(6232)
      open(11,file='lont42r_b',form='unformatted')
      read(11)xlon
      print*,'xlon'
      print 1000,(xlon(i),i=1,10)
      open(12,file='lont42r',convert='big_endian',form='unformatted')
      read(12)xlon
      print*,'xlon big'
      print 1000,(xlon(i),i=1,10)
1000  format((10f8.2))
      stop
      end

=> gfortran ess_bin.f90
=> a.out
 xlon
   18.00   36.00   54.00   72.00   90.00  108.00  126.00  144.00
162.00  180.00
At line 8 of file ess_bin.f90
Fortran runtime error: Invalid argument

I try to read a longitude file :

-rw-r--r--  1 tyteca udc  24936 déc  1  2005 lont42r     :  it is the
big_endian file
-rw-r--r--  1 tyteca udc  24936 oct 16 09:53 lont42r_b  : it is  the
same file  but swaped (little endian file)

To be able to diagnose the problem, we'd need the files themselves. Could you send them or put them for some time at some URL that is publicly available?

FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]