From 80ad19715e00f32845b1c7d775ab75512da6de50 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sat, 18 Oct 2008 05:23:47 +0000 Subject: [PATCH] re PR fortran/37863 (Display of a value close but less to 1 shows 2 with '(F3.0)') 2008-10-17 Jerry DeLisle * io/file_pos.c (unformatted_backspace): Normal case is diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h index 710224de21d..ec37be37a81 100644 --- a/libgfortran/io/io.h +++ b/libgfortran/io/io.h @@ -458,7 +458,7 @@ typedef struct st_parameter_43 typedef struct st_parameter_44 { - GFC_IO_INT *id; + GFC_INTEGER_4 *id; GFC_IO_INT pos; CHARACTER1 (asynchronous); CHARACTER2 (blank); diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def index 0ee8f3560c4..73a6ed14a1b 100644 --- a/libgfortran/io/write_float.def +++ b/libgfortran/io/write_float.def @@ -746,7 +746,7 @@ sprintf (buffer, "%+-#" STR(MIN_FIELD_WIDTH) ".*" \ if (tmp < 0.5)\ tmp = 0.0;\ else if (tmp < 1.0)\ - tmp = tmp + 0.5;\ + tmp = 1.0;\ }\ zero_flag = (tmp == 0.0);\ \