This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60128] [4.8/4.9 Regression] Wrong ouput using en edit descriptor
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 16 Feb 2014 20:49:50 +0000
- Subject: [Bug fortran/60128] [4.8/4.9 Regression] Wrong ouput using en edit descriptor
- Auto-submitted: auto-generated
- References: <bug-60128-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60128
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
While the patch in comment 4 fixed they PR, it was quite hawkish and did not
explained the problem. After a deeper analysis it turns out that it is yet
another "off by one bug" fixed by the following one liner:
--- ../_clean/libgfortran/io/write_float.def 2014-01-21 08:30:57.000000000
+0100
+++ libgfortran/io/write_float.def 2014-02-16 20:56:56.000000000 +0100
@@ -1204,7 +1200,7 @@ determine_en_precision (st_parameter_dt
if (nprinted == -1)
return -1;
- int e = atoi (&buffer[5]);
+ int e = atoi (&buffer[4]);
int nbefore; /* digits before decimal point - 1. */
if (e >= 0)
nbefore = e % 3;
as &buffer[5] does not include the sign of the exponent.