This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55539] New: [4.8 Regression] -fno-sign-zero may generate wrong formatted output
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Nov 2012 22:11:07 +0000
- Subject: [Bug fortran/55539] New: [4.8 Regression] -fno-sign-zero may generate wrong formatted output
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55539
Bug #: 55539
Summary: [4.8 Regression] -fno-sign-zero may generate wrong
formatted output
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: anlauf@gmx.de
The code
program gfcbug120
implicit none
real(4) :: x = -1.2e-3
real(8) :: y = -1.2e-3
print *, x, y
print '(7f10.3)', x, y
end program gfcbug120
incorrectly prints
-1.20000006E-03 -1.2000000569969416E-003
0.001 0.001
with -fno-sign-zero; the correct result would be
-1.20000006E-03 -1.2000000569969416E-003
-0.001 -0.001
This works with 4.7.