[Bug fortran/43115] New: bug with gfortran on Windows vista, correct on Linux
cgerdy at wanadoo dot fr
gcc-bugzilla@gcc.gnu.org
Thu Feb 18 17:59:00 GMT 2010
listing of the gfortran program whith the bug
use iso_fortran_env
implicit none
integer,parameter:: mligne = 10000,n2 = 10
character(len = n2 + 2):: ligne ! the bug is here : 2 is not necessary
for reading essai.f95 : 10 max character per line
! character(len = n2 ):: ligne ! the bug is here did not work : only 8
max character per line
! character(len = n2 + 1):: ligne ! the bug is here did not work : only 9
max character per line
character(len = 260):: string
integer:: i,j,iosta,nligne
write(output_unit,*) ' name of he file to read'
read(input_unit,*) string
open(unit = 7,action = 'read',file = string)
do i = 1,mligne
read(unit = 7,fmt = '(a)',iostat = iosta) ligne
if(iosta .eq. iostat_end) go to 100
if(iosta .eq. iostat_eor) go to 200
200 continue
end do
100 continue
close(unit = 7)
nligne = i - 1
write(6,*) "number of read lines = ",nligne
end
listing of the file not correctly read : essai.f95 :
12345
123456
1234567
12345678
123456789
1234567890
123456789
12345678
1234567
123456
12345
Because no bug on Linux : end of line : Carriage return + form feed ?
--
Summary: bug with gfortran on Windows vista, correct on Linux
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cgerdy at wanadoo dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43115
More information about the Gcc-bugs
mailing list