Hi,

I plan to commit the following simple and obvious patch.

Regression tested on x86-64-linux-gnu.

I will apply the test case in the PR to the testsuite.

Regards,

Jerry

2011-04-15  Jerry DeLisle  <jvdeli...@gcc.gnu.org>

        PR libgfortran/48589
        * io/write_float.def (write_infnan): Set width properly for G0.

Index: write_float.def
===================================================================
--- write_float.def     (revision 172467)
+++ write_float.def     (working copy)
@@ -654,11 +654,11 @@ write_infnan (st_parameter_dt *dtp, const fnode *f
       mark = (sign == S_PLUS || sign == S_MINUS) ? 8 : 7;

       nb =  f->u.real.w;
-
+
       /* If the field width is zero, the processor must select a width
         not zero.  4 is chosen to allow output of '-Inf' or '+Inf' */

-      if (nb == 0)
+      if ((nb == 0) || dtp->u.p.g0_no_blanks)
        {
          if (isnan_flag)
            nb = 3;

Reply via email to