diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-01 12:37:05 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-01 12:37:05 +0000 |
commit | a0580f378928588626cfa691c5b5dcf9aa3a9d5e (patch) | |
tree | e7e24d42157918f0b591e322d1b3ae28916fd1ae | |
parent | ade444a4547041efeb711cd282e7f9ed5f845622 (diff) | |
download | gcc-a0580f378928588626cfa691c5b5dcf9aa3a9d5e.tar.gz |
2011-05-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/48787
* gfortran.dg/round_3.f08: Add more checks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173233 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/round_3.f08 | 25 |
2 files changed, 21 insertions, 9 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d3d88c8a502..01eabe0ad55 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-01 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libgfortran/48787 + * gfortran.dg/round_3.f08: Add more checks. + 2011-04-30 Tobias Burnus <burnus@net-b.de> PR fortran/48821 diff --git a/gcc/testsuite/gfortran.dg/round_3.f08 b/gcc/testsuite/gfortran.dg/round_3.f08 index ec02bc93129..12d9770fd76 100644 --- a/gcc/testsuite/gfortran.dg/round_3.f08 +++ b/gcc/testsuite/gfortran.dg/round_3.f08 @@ -4,10 +4,17 @@ program pr48615 call checkfmt("(RU,F17.0)", 2.5, " 3.") call checkfmt("(RU,-1P,F17.1)", 2.5, " 0.3") - call checkfmt("(RU,E17.1)", 2.5, " 0.3E+01") ! 0.2E+01 + call checkfmt("(RU,E17.1)", 2.5, " 0.3E+01") call checkfmt("(RU,1P,E17.0)", 2.5, " 3.E+00") - call checkfmt("(RU,ES17.0)", 2.5, " 3.E+00") ! 2.E+00 + call checkfmt("(RU,ES17.0)", 2.5, " 3.E+00") call checkfmt("(RU,EN17.0)", 2.5, " 3.E+00") + call checkfmt("(RU,F2.0)", 2.0, "2.") + call checkfmt("(RU,F6.4)", 2.0, "2.0000") + call checkfmt("(RU,1P,E6.0E2)", 2.0, "2.E+00") + call checkfmt("(RU,1P,E7.1E2)", 2.5, "2.5E+00") + call checkfmt("(RU,1P,E10.4E2)", 2.5, "2.5000E+00") + call checkfmt("(RU,1P,G6.0E2)", 2.0, "2.E+00") + call checkfmt("(RU,1P,G10.4E2)", 2.3456e5, "2.3456E+05") call checkfmt("(RD,F17.0)", 2.5, " 2.") call checkfmt("(RD,-1P,F17.1)", 2.5, " 0.2") @@ -18,9 +25,9 @@ program pr48615 call checkfmt("(RC,F17.0)", 2.5, " 3.") call checkfmt("(RC,-1P,F17.1)", 2.5, " 0.3") - call checkfmt("(RC,E17.1)", 2.5, " 0.3E+01") ! 0.2E+01 + call checkfmt("(RC,E17.1)", 2.5, " 0.3E+01") call checkfmt("(RC,1P,E17.0)", 2.5, " 3.E+00") - call checkfmt("(RC,ES17.0)", 2.5, " 3.E+00") ! 2.E+00 + call checkfmt("(RC,ES17.0)", 2.5, " 3.E+00") call checkfmt("(RC,EN17.0)", 2.5, " 3.E+00") call checkfmt("(RN,F17.0)", 2.5, " 2.") @@ -53,20 +60,20 @@ program pr48615 call checkfmt("(RC,F17.0)", -2.5, " -3.") call checkfmt("(RC,-1P,F17.1)", -2.5, " -0.3") - call checkfmt("(RC,E17.1)", -2.5, " -0.3E+01") ! -0.2E+01 + call checkfmt("(RC,E17.1)", -2.5, " -0.3E+01") call checkfmt("(RC,1P,E17.0)", -2.5, " -3.E+00") - call checkfmt("(RC,ES17.0)", -2.5, " -3.E+00") ! -2.E+00 + call checkfmt("(RC,ES17.0)", -2.5, " -3.E+00") call checkfmt("(RC,EN17.0)", -2.5, " -3.E+00") - call checkfmt("(RU,E17.1)", nearest(2.0, 1.0), " 0.3E+01") ! 0.2E+01 - call checkfmt("(RD,E17.1)", nearest(3.0, -1.0), " 0.2E+01") ! 0.3E+01 + call checkfmt("(RU,E17.1)", nearest(2.0, 1.0), " 0.3E+01") + call checkfmt("(RD,E17.1)", nearest(3.0, -1.0), " 0.2E+01") contains subroutine checkfmt(fmt, x, cmp) character(len=*), intent(in) :: fmt real, intent(in) :: x character(len=*), intent(in) :: cmp - character(len=40) :: s + character(len=20) :: s write(s, fmt) x if (s /= cmp) call abort |