This is the mail archive of the 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/33400] New: Formatted read fails if line ends without line break

The following program works if one changes advance="no" into "yes". Otherwise
one gets the run-time error message:

At line 7 of file tes.f90 (unit = 20, file = 'test.dat')
Fortran runtime error: End of file

This program works with NAG f95, ifort, g95, openf95.

This is the last remaining bug to get FGSL working.

  integer, parameter :: fgsl_strmax = 128
  character(len=fgsl_strmax) :: ieee_str1, ieee_str2
  open(unit=20, file='test.dat',form='FORMATTED')
  write(20,'(a)',advance="no") ' 1.01010101010101010101010101010101&
         &01010101010101010101*2^-2 1.01010101010101010101011*2^-2'
  read(20, fmt=*) ieee_str1, ieee_str2
  if (trim(ieee_str1) /= &
      '1.0101010101010101010101010101010101010101010101010101*2^-2') &
    stop 'ERROR'
  if (trim(ieee_str2) /= &
       '1.01010101010101010101011*2^-2') &
    stop 'ERROR'

           Summary: Formatted read fails if line ends without line break
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org

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