2011-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Feb 2011 15:10:55 +0000 (15:10 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Feb 2011 15:10:55 +0000 (15:10 +0000)
PR libgfortran/47567
* io/write_float.def (output_float): Adjust width for F0.d to
allow space for negative signs on zero.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170318 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/write_float.def

index 7371e8e..d53329d 100644 (file)
@@ -1,6 +1,12 @@
-2011-02-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+2011-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/47567
+       * io/write_float.def (output_float): Adjust width for F0.d to
+       allow space for negative signs on zero.
+
+2011-02-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/47667
        * io/list_read.c (read_logical): Check for end of line before calling
        eat_line. (read_integer): Likewise. (parse_real): Don't unget the
        separator. Check for end of line before calling eat_line.
index 29b8f1f..1373819 100644 (file)
@@ -116,7 +116,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
 
       /* Handle special cases.  */
       if (w == 0)
-       w = d + 1;
+       w = d + (sign != S_NONE ? 2 : 1) + (d == 0 ? 1 : 0);
 
       /* For this one we choose to not output a decimal point.
         F95 10.5.1.2.1  */