[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#905266: gfortran: Write and read arrays in unformatted files do not work properly



Package: gfortran
Version: 4:8.1.0-1
Severity: important

Dear Maintainer,

I'm running a fortran hydrodynamic model. Here we have a routine writing
an unformatted file with an header and a real array with the following
code:

 write(30,iostat=ierr) time,ivar,m,lmax
     +                          ,(((vals(l,j,i)
     +                          ,l=1,ll(j))
     +                          ,j=1,jj)
     +                          ,i=1,m)

and a second routine this file with:

 read(20,iostat=ierr) time,ivar,m,lmax
     +                          ,(((vals(l,j,i)
     +                          ,l=1,ll(j))
     +                          ,j=1,jj)
     +                          ,i=1,m)

where vals is a real array. 
The problem is that if I write the file and then I read it and I print "vals" 
it contains 0.00 values. 
If I set ll(j) = 1 and I write in both the routines: 
      +                         ,l=1,1)
the code works.

With old gfortran versions the code worked, as well as with other compilers.

Thank you



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (300, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gfortran depends on:
ii  cpp         4:8.1.0-1
ii  gcc         4:8.1.0-1
ii  gfortran-8  8.2.0-1

gfortran recommends no packages.

Versions of packages gfortran suggests:
pn  gfortran-doc       <none>
pn  gfortran-multilib  <none>

-- no debconf information


Reply to: