From 94ce26f1b70ae1c06ef6ec71537e5b3495a49dd0 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Tue, 10 Feb 2015 02:49:58 +0000 Subject: [PATCH] re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000") 2015-02-09 Jerry DeLisle PR libgfortran/57822 * io/write_float.def (output_float): If doing g0 editing and exponent is zero, do not emit exponent. From-SVN: r220564 --- libgfortran/ChangeLog | 6 ++++++ libgfortran/io/write_float.def | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index d3b8f8f6e48..61de246a149 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2015-02-09 Jerry DeLisle + + PR libgfortran/57822 + * io/write_float.def (output_float): If doing g0 editing and + exponent is zero, do not emit exponent. + 2015-02-07 Jerry DeLisle PR libgfortran/60956 diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def index 1bcd8159a22..434c3dfd069 100644 --- a/libgfortran/io/write_float.def +++ b/libgfortran/io/write_float.def @@ -724,7 +724,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 != ' ') { -- 2.30.2