re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000")
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 11 Feb 2015 04:29:06 +0000 (04:29 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 11 Feb 2015 04:29:06 +0000 (04:29 +0000)
2015-02-10 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/57822
* io/write_float.def (output_float): Apply fix of previous patch
to correctly calculate the exponent number of digits and take
care of wide character output.

From-SVN: r220606

libgfortran/ChangeLog
libgfortran/io/write_float.def

index 61de246a1497d696abce533832f0f8192adfbf4b..612ed81a0398f4b40c04b67c4f8d92e20883b71c 100644 (file)
@@ -1,3 +1,10 @@
+2015-02-10 Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/57822
+       * io/write_float.def (output_float): Apply fix of previous patch
+       to correctly calculate the exponent number of digits and take
+       care of wide character output.
+
 2015-02-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/57822
index 434c3dfd06983650c85dc78e11e21411dc1c6378..1bbe0160619d530dbad95000740ed634075814ca 100644 (file)
@@ -446,7 +446,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
   skip:
 
   /* Calculate the format of the exponent field.  */
-  if (expchar)
+  if (expchar && !(dtp->u.p.g0_no_blanks && e == 0))
     {
       edigits = 1;
       for (i = abs (e); i >= 10; i /= 10)
@@ -632,7 +632,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
        }
 
       /* Output the exponent.  */
-      if (expchar)
+      if (expchar && !(dtp->u.p.g0_no_blanks && e == 0))
        {
          if (expchar != ' ')
            {