summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-05 04:07:45 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-05 04:07:45 +0000
commitb33273f6808416772e519c029d1b20d10d903a3d (patch)
tree3d5f22c3ad507302876cd86325c7e5d4aa8921f8 /libgfortran
parent6a27e70fe5a7d8fbe0259ed51542f53ca2cd3be2 (diff)
downloadgcc-b33273f6808416772e519c029d1b20d10d903a3d.tar.gz
2008-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/38285 * write_float.def (WRITE_FLOAT): Zero the float value for special case only if scale_factor = 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142455 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/write_float.def3
2 files changed, 8 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 36c0098cab2..bb860d4816f 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/38285
+ * write_float.def (WRITE_FLOAT): Zero the float value for special case
+ only if scale_factor = 0.
+
2008-11-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/38234
diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def
index 8bb4123084f..d8799f2ae03 100644
--- a/libgfortran/io/write_float.def
+++ b/libgfortran/io/write_float.def
@@ -760,7 +760,8 @@ sprintf (buffer, "%+-#" STR(MIN_FIELD_WIDTH) ".*" \
return;\
}\
tmp = sign_bit ? -tmp : tmp;\
- if (f->u.real.d == 0 && f->format == FMT_F)\
+ if (f->u.real.d == 0 && f->format == FMT_F\
+ && dtp->u.p.scale_factor == 0)\
{\
if (tmp < 0.5)\
tmp = 0.0;\