projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
667a459
)
(fpadd_parts): Adding infinities with opposite signs yields a NaN.
author
Jim Wilson
<wilson@gcc.gnu.org>
Mon, 19 Dec 1994 20:48:30 +0000
(12:48 -0800)
committer
Jim Wilson
<wilson@gcc.gnu.org>
Mon, 19 Dec 1994 20:48:30 +0000
(12:48 -0800)
From-SVN: r8667
gcc/config/fp-bit.c
patch
|
blob
|
history
diff --git
a/gcc/config/fp-bit.c
b/gcc/config/fp-bit.c
index 373c2516d771018d1d838fb9b9da50f0d2083eac..9f2d27979cfd58668151b684b135af60bac532cc 100644
(file)
--- a/
gcc/config/fp-bit.c
+++ b/
gcc/config/fp-bit.c
@@
-485,6
+485,9
@@
_fpadd_parts (fp_number_type * a,
}
if (isinf (a))
{
+ /* Adding infinities with opposite signs yields a NaN. */
+ if (isinf (b) && a->sign != b->sign)
+ return nan ();
return a;
}
if (isinf (b))