From ffe89a288f62fea6f62eeed7225e8e742e0fa2e7 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sat, 19 Feb 2011 15:10:55 +0000 Subject: [PATCH] re PR libfortran/47567 (Wrong output for small absolute values with F editing) 2011-02-19 Jerry DeLisle PR libgfortran/47567 * io/write_float.def (output_float): Adjust width for F0.d to allow space for negative signs on zero. From-SVN: r170318 --- libgfortran/ChangeLog | 8 +++++++- libgfortran/io/write_float.def | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 7371e8e2be1..d53329daae6 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,6 +1,12 @@ -2011-02-16 Jerry DeLisle +2011-02-19 Jerry DeLisle 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 + + 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. diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def index 29b8f1f1681..13738190b08 100644 --- a/libgfortran/io/write_float.def +++ b/libgfortran/io/write_float.def @@ -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 */ -- 2.30.2