re PR libfortran/17706 (reading a value of 0.0 gives a value of -0.0)
authorPaul Brook <paul@codesourcery.com>
Mon, 4 Oct 2004 15:32:13 +0000 (15:32 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Mon, 4 Oct 2004 15:32:13 +0000 (15:32 +0000)
2004-10-04  Paul Brook  <paul@codesourcery.com>
Bud Davis  <bdavis9659@comcast.net>

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.

Co-Authored-By: Bud Davis <bdavis9659@comcast.net>
From-SVN: r88512

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr17706.f90 [new file with mode: 0644]
libgfortran/ChangeLog

index 3f54500f88e3d4cc5bb2b7ad9d794df44c2d05f4..d6c26dfe3ce18e704065ca1667f5853613719fcc 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-04  Paul Brook  <paul@codesourcery.com>
+       Bud Davis  <bdavis9659@comcast.net>
+
+       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  <tobias.schlueter@physik.uni-muenchen.de>
 
        * 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 (file)
index 0000000..f678736
--- /dev/null
@@ -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
index 29eca218195b278eec93dbe338e633d6b9033e7b..c9567d76335662ce5fe2e71b168e041fe72a0b67 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-04  Paul Brook  <paul@codesourcery.com>
+       Bud Davis  <bdavis9659@comcast.net>
+
+       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 <aaronavay62@aaronwl.com>
 
        * intrinsics/abort.c ("libgfortran.h"): Move.