From: Jerry DeLisle Date: Wed, 11 Feb 2015 04:29:06 +0000 (+0000) Subject: re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000") X-Git-Tag: releases/gcc-5.1.0~1021 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80f6181e2727fc2c2d74b603f94d44ae36daae66;p=thirdparty%2Fgcc.git re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000") 2015-02-10 Jerry DeLisle 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 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 61de246a1497..612ed81a0398 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2015-02-10 Jerry DeLisle + + 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 PR libgfortran/57822 diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def index 434c3dfd0698..1bbe0160619d 100644 --- a/libgfortran/io/write_float.def +++ b/libgfortran/io/write_float.def @@ -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 != ' ') {