diff options
author | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-28 01:30:26 +0000 |
---|---|---|
committer | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-28 01:30:26 +0000 |
commit | 2007e93cbda0a12b3f0707d4d3235916b18aae1d (patch) | |
tree | 0dab78a9c80385474b8b365a888d455495b35b1d /libgfortran/io | |
parent | d96c50d1f8d9aaba73212210b51bbf84f97bc581 (diff) | |
download | gcc-2007e93cbda0a12b3f0707d4d3235916b18aae1d.tar.gz |
2004-06-27 Bud Davis <bdavis9659@comcast.net>
PR gfortran/12839
* io/write.c (write_float): check signbit for Infinity.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83757 138bc75d-0d04-0410-961f-82ee72b054a4
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 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); |