This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/73142] Reading a namelist fails - my code worked until 4.8.2


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73142

--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to Günter Weber from comment #0)
> 
> I am using the GCC package for Windows provided by www.equation.com. It
> looks like after version 4.8.2 a bug was introduced in the reading of
> namelists. The reading is rubbish when the data file has a certain format.
> But at least in Windows when you open the data file in a common editor you
> see identical content to a version of the data file, which can be read
> correctly.

The files are not identical. fileA.dat terminates lines
with a line with a LF.  fileB.dat terminates lines with
a CRLF.

With gfortran 5.4.1 I can read fileA.dat.  Reading fileB.dat
generates

  At line 14 of file minimum_example.f (unit = 31, file = 'fileB.dat')
  Fortran runtime error: Cannot match namelist object name 30.00

With gfortran 6.1.1, I get the same results as with 5.4.1, except
the built executable aborts with a backtrace.

With gfortran 7.0.0, both files can be read.  So, the bug is
fixed on trunk.  You can update to trunk or ensure your files
have the format of fileA.dat.

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