From: Bud Davis Date: Mon, 28 Jun 2004 01:30:26 +0000 (+0000) Subject: re PR libfortran/12839 (incorrect IO of Inf) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=519b0e16cd642411cdcc18d3a317b0e475bb542b;p=gcc.git re PR libfortran/12839 (incorrect IO of Inf) 2004-06-27 Bud Davis PR gfortran/12839 * io/write.c (write_float): check signbit for Infinity. From-SVN: r83757 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index b1babff4f6d..65841f833f7 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2004-06-27 Bud Davis + + PR gfortran/12839 + * io/write.c (write_float): check signbit for Infinity. + 2004-06-26 Bud Davis PR gfortran/16196 diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index e4f597cbd04..3602c1b9157 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -523,13 +523,13 @@ write_float (fnode *f, const char *source, int len) } memset(p, ' ', nb); - res = isinf (n); + res = isinf (n); if (res != 0) { - if (res > 0) - fin = '+'; - else + if (signbit(n)) fin = '-'; + else + fin = '+'; if (nb > 7) memcpy(p + nb - 8, "Infinity", 8);