[Bug fortran/25264] New: write to internal unit from the string itself gives wrong result ?
jpr at csc dot fi
gcc-bugzilla@gcc.gnu.org
Mon Dec 5 13:05:00 GMT 2005
Hi!
The following program
program a
character(len=10) :: str
str = '123'
write( str, '(a,i1)' ) trim(str),4
print*,str
end program a
outputs
[jpr@dhcp-38 fem]$ gfortran -o a a.f90; ./a
4
all other compilers i've tried (sun f90, xlf, g95, ifort) seem to agree the
output should be
1234
Regards, Juha
--
Summary: write to internal unit from the string itself gives
wrong result ?
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jpr at csc dot fi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25264
More information about the Gcc-bugs
mailing list