diff options
author | Bud Davis <bdavis9659@comcast.net> | 2004-06-28 01:30:26 +0000 |
---|---|---|
committer | Bud Davis <bdavis@gcc.gnu.org> | 2004-06-28 01:30:26 +0000 |
commit | 519b0e16cd642411cdcc18d3a317b0e475bb542b (patch) | |
tree | 0dab78a9c80385474b8b365a888d455495b35b1d /libgfortran/io | |
parent | e6d6c95a52fc55d925cf98c4baa659707a69eaba (diff) | |
download | gcc-519b0e16cd642411cdcc18d3a317b0e475bb542b.zip gcc-519b0e16cd642411cdcc18d3a317b0e475bb542b.tar.gz gcc-519b0e16cd642411cdcc18d3a317b0e475bb542b.tar.bz2 |
re PR libfortran/12839 (incorrect IO of Inf)
2004-06-27 Bud Davis <bdavis9659@comcast.net>
PR gfortran/12839
* io/write.c (write_float): check signbit for Infinity.
From-SVN: r83757
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/write.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index e4f597c..3602c1b 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); |