aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-01-05 16:49:05 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2007-01-05 16:49:05 +0100
commit698ac9345ab418493fed8f97902f23fe6ddec3f8 (patch)
treed22bdbbd927716ab77625c5086c5bc05222af12c /gcc/libgcc2.c
parent2220652d3f79f773fb25b4d21ea4cbf4406d1df2 (diff)
downloadgcc-698ac9345ab418493fed8f97902f23fe6ddec3f8.zip
gcc-698ac9345ab418493fed8f97902f23fe6ddec3f8.tar.gz
gcc-698ac9345ab418493fed8f97902f23fe6ddec3f8.tar.bz2
re PR c/30360 (Complex divide bug)
PR c/30360 * libgcc2.c (__divdc3): Compare c and d against 0.0 instead of denom against 0.0. * gcc.dg/pr30360.c: New test. From-SVN: r120486
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index b78b8f6..8c0c9d1 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -1909,7 +1909,7 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
are nonzero/zero, infinite/finite, and finite/infinite. */
if (isnan (x) && isnan (y))
{
- if (denom == 0.0 && (!isnan (a) || !isnan (b)))
+ if (c == 0.0 && d == 0.0 && (!isnan (a) || !isnan (b)))
{
x = COPYSIGN (INFINITY, c) * a;
y = COPYSIGN (INFINITY, c) * b;