re PR libfortran/48787 (Invalid UP/DOWN rounding with F editing)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 5 May 2011 01:23:46 +0000 (01:23 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 5 May 2011 01:23:46 +0000 (01:23 +0000)
2011-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/48787
gfortran.dg/round_3.f08: Add more checks to test case.

From-SVN: r173409

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/round_3.f08

index 32d9f9654552b6c56d501438bad569f1912a80a7..030501d672ad38db3704b0c00d951b84bebf6eb2 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/48787
+       gfortran.dg/round_3.f08: Add more checks to test case.
+
 2011-05-04  Hans-Peter Nilsson  <hp@axis.com>
 
        * gfortran.dg/pr47878.f90, gfortran.dg/endfile_3.f90,
index 12d9770fd76ee611e4e302dce2742dfea8b71bb0..8b03ce562f10d7e66637891e902f1ed56625a337 100644 (file)
@@ -16,6 +16,23 @@ 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,F2.0)",     0.09,  "1.")     ! 0.
+    call checkfmt("(RD,F3.0)",     -0.09,  "-1.")     ! -0.
+    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
+    call checkfmt("(RD,F7.4)",     -2.0,  "-2.0000")     ! -2.0001
+    call checkfmt("(RU,1P,E6.0E2)", 2.0,  "2.E+00") ! 3.E+00
+    call checkfmt("(RD,1P,E7.0E2)", -2.0,  "-2.E+00") ! -3.E+00
+    call checkfmt("(RU,1P,E7.1E2)", 2.5,  "2.5E+00") ! 2.6E+00
+    call checkfmt("(RD,1P,E8.1E2)", -2.5,  "-2.5E+00") ! -2.6E+00
+    call checkfmt("(RU,1P,E10.4E2)", 2.5,  "2.5000E+00") ! 2.5001E+00
+    call checkfmt("(RD,1P,E11.4E2)", -2.5,  "-2.5000E+00") ! -2.5001E+00
+    call checkfmt("(RU,1P,G6.0E2)", 2.0,  "2.E+00") ! 3.E+00
+    call checkfmt("(RD,1P,G7.0E2)", -2.0,  "-2.E+00") ! -3.E+00
+    call checkfmt("(RU,1P,G10.4E2)", 2.3456e5,  "2.3456E+05") ! 2.3457E+05
+    call checkfmt("(RD,1P,G11.4E2)", -2.3456e5,  "-2.3456E+05") ! -2.3457E+05
+
     call checkfmt("(RD,F17.0)", 2.5,     "               2.")
     call checkfmt("(RD,-1P,F17.1)", 2.5, "              0.2")
     call checkfmt("(RD,E17.1)", 2.5,     "          0.2E+01")