[gfortran PATCH] Fix io/write.c.
Paul Brook
paul@codesourcery.com
Mon Sep 6 17:30:00 GMT 2004
On Monday 06 September 2004 17:05, Steve Kargl wrote:
> The attached patch fixes a problem with writing
> floatingpoints numbers of the form 1e10.
>
> 2004-09-06 Steven G. Kargl <kargls@comcast.net>
>
> * io/write.c (output_float): Typo in comment. Remove debugging
> printf. Fix format for FP of form 1e10.
Applied, thanks. I also added a test for this.
Paul
Index: gcc/testsuite/gfortran.dg/edit_real_1.f90
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/testsuite/gfortran.dg/edit_real_1.f90,v
retrieving revision 1.2
diff -u -p -r1.2 edit_real_1.f90
--- gcc/testsuite/gfortran.dg/edit_real_1.f90 2 Sep 2004 01:33:01 -0000 1.2
+++ gcc/testsuite/gfortran.dg/edit_real_1.f90 6 Sep 2004 16:23:10 -0000
@@ -70,5 +70,9 @@ program edit_real_1
s = x
write (s, '(-2PE10.4,A)') 1.25, "z"
if (s .ne. '0.0013E+03z') call abort
+ ! E format, single digit precision
+ s = x
+ write (s, '(E10.1,A)') 1.1, "z"
+ if (s .ne. ' 0.1E+01z') call abort
end
More information about the Gcc-patches
mailing list