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

            Bug ID: 63460
           Summary: Some namelists cannot be read from stdin (unit 5):
                    Fortran runtime error: End of file
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: toon at moene dot org

The following Fortran program, when compiled with gfortran 4.9.1 or trunk
(5.0), cannot read a valid namelist file from stdin (unit 5).

Reading it from another unit (or as an internal file) proceeds fine.

Fortran program:

      character*10 file /'noot.hdf'/
      character*5  aap(10) /10*""/
      integer      par(10) /10*3/
      namelist /namlis/ file, aap, par
      read (5, namlis)
      write(6, namlis)
      end

Namelist file (which is redirected to stdin):

&NAMLIS
file='aap.hdf', aap(5)='noot', par(5)=6
/

Reply via email to