This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33400] New: Formatted read fails if line ends without line break
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Sep 2007 20:40:07 -0000
- Subject: [Bug fortran/33400] New: Formatted read fails if line ends without line break
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.
http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/
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'
rewind(20)
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'
end
--
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33400