[Bug libfortran/59836] [4.7/4.8/4.9 Regression] Wrong outputs with rounding formats for some values.
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Sat Jan 18 11:22:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59836
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Any comment about the following patch for testing the fix of this PR?
--- ../_clean/gcc/testsuite/gfortran.dg/round_3.f08 2011-05-05
03:54:21.000000000 +0200
+++ gcc/testsuite/gfortran.dg/round_3.f08 2014-01-18 11:17:21.000000000
+0100
@@ -16,8 +16,19 @@ program pr48615
call checkfmt("(RU,1P,G6.0E2)", 2.0, "2.E+00")
call checkfmt("(RU,1P,G10.4E2)", 2.3456e5, "2.3456E+05")
+ call checkfmt("(RU,G9.3)", 891.1, " 892.") ! pr59836
+ call checkfmt("(RD,G9.3)", -891.1, "-892.") ! pr59836
+
call checkfmt("(RU,F2.0)", 0.09, "1.") ! 0.
call checkfmt("(RD,F3.0)", -0.09, "-1.") ! -0.
+ call checkfmt("(RU,F2.0)", 0.9, "1.") ! pr59836
+ call checkfmt("(RC,F2.0)", 0.4, "0.") ! pr59836
+ call checkfmt("(RC,F2.0)", 0.5, "1.") ! pr59836
+ call checkfmt("(RC,F2.0)", 0.6, "1.") ! pr59836
+ call checkfmt("(RD,F3.0)", -0.9, "-1.") ! pr59836
+ call checkfmt("(RC,F3.0)", -0.4, "-0.") ! pr59836
+ call checkfmt("(RC,F3.0)", -0.5, "-1.") ! pr59836
+ call checkfmt("(RC,F3.0)", -0.6, "-1.") ! pr59836
call checkfmt("(RU,F2.0)", 2.0, "2.") ! 3.
call checkfmt("(RD,F3.0)", -2.0, "-2.") ! -3.
call checkfmt("(RU,F6.4)", 2.0, "2.0000") ! 2.0001
More information about the Gcc-bugs
mailing list