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

           Summary: I/O for reals: READ waits for input after "i" and "n"
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org
                CC: jvdeli...@gcc.gnu.org


Based on
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A1=ind1102&L=COMP-FORTRAN-90#2

If one uses:
  READ (*,*) real_variable
and enters "i"<enter> or "n"<enter>, gfortran does not immediately return with
an error but waits for further input. As it does not accept "N"<enter>"aN" but
only "NaN" and "Inf"/"Infinity" as input, this behaviour does not not make
sense.

For other characters, e.g. "e" or "d" it immediately returns with an error.

Expected: As NAG, ifort, pathf95 do (for the linked test case):

  -9.9900000E+02
 Input new value:
i
  ioerr =  140         a =   -9.9900000E+02


Result with gfortran (note extra input line):

  -999.00000
 Input new value:
i

  ioerr =         5010         a =   -999.00000
 Input new value:
i
nf
  ioerr =         5010         a =   -999.00000

Reply via email to