This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37863] New: Display of a value close to 1 shows 2
- From: "sylvestre dot ledru at inria dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Oct 2008 15:16:56 -0000
- Subject: [Bug fortran/37863] New: Display of a value close to 1 shows 2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
With the code here:
----
program pb
character*10 form
character*4093 str
str=' '
write(form,120) 3,0
write(str(1:3),form) 1.0d0 - 1.110223024625157D-16
print *,str(1:10)
120 format('(f',i2,'.',i2,')')
end
----
Compiled with gfortran 4.3.2:
the output is 2
With the gfortran 4.2.4
the result is 1 (which is the right one)
$ gfortran-4.3 -o pb pb.f && ./pb
2.
$ gfortran-4.2 -o pb pb.f && ./pb
1.
--
Summary: Display of a value close to 1 shows 2
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sylvestre dot ledru at inria dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37863