From 03be79050e41b7f56443511f010242beb0f267f8 Mon Sep 17 00:00:00 2001 From: pbrook Date: Mon, 4 Oct 2004 15:32:13 +0000 Subject: [PATCH] 2004-10-04 Paul Brook Bud Davis PR fortran/17706 PR fortran/16434 * io/format.c (parse_format_list): Set repeat count for S, SP, SS, BN and BZ formats. * io/write.c (output_float): Don't output minus zero. libgfortran/ * gfortran/pr17706.f90: New test. * gfortran.dg/g77/f77-edit-s-out.f: Remove xfail. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88512 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gfortran.dg/pr17706.f90 | 24 ++++++++++++++++++++++++ libgfortran/ChangeLog | 9 +++++++++ 3 files changed, 41 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr17706.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3f54500f88e..d6c26dfe3ce 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2004-10-04 Paul Brook + Bud Davis + + PR fortran/17706 + PR fortran/16434 + * gfortran/pr17706.f90: New test. + * gfortran.dg/g77/f77-edit-s-out.f: Remove xfail. + 2004-10-04 Tobias Schlueter * gfortran.dg/pr17612.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/pr17706.f90 b/gcc/testsuite/gfortran.dg/pr17706.f90 new file mode 100644 index 00000000000..f6787368fa7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr17706.f90 @@ -0,0 +1,24 @@ +! { dg-do run } +! PR17706 +! this is a libgfortran test +! output value -0.00 is not standard compliant +! derived from NIST F77 test FM406, with extra bits added. +program pr17706 + implicit none + character(len=10) :: s + character(len=10), parameter :: x = "xxxxxxxxxx" + real, parameter :: small = -0.0001 + + s = x + write (s, '(F4.1)') small + ! The plus is optional. We choose not to display it. + if (s .ne. " 0.0") call abort + + s = x + write (s, '(SS,F4.1)') small + if (s .ne. " 0.0") call abort + + s = x + write (s, '(SP,F4.1)') small + if (s .ne. "+0.0") call abort +end program diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 29eca218195..c9567d76335 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2004-10-04 Paul Brook + Bud Davis + + PR fortran/17706 + PR fortran/16434 + * io/format.c (parse_format_list): Set repeat count for S, SP, SS, + BN and BZ formats. + * io/write.c (output_float): Don't output minus zero. + 2004-10-03 Aaron W. LaFramboise * intrinsics/abort.c ("libgfortran.h"): Move. -- 2.11.4.GIT