aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-04-15 08:06:07 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-04-15 08:06:07 -0400
commit2dedbe1f310983cd826910160c779a4a755377f0 (patch)
tree9962362880b2293be8db2a3ad013760aa318f869 /gcc/real.c
parentbde304768ee1ac2f45f55ed217b595618de5aeca (diff)
downloadgcc-2dedbe1f310983cd826910160c779a4a755377f0.zip
gcc-2dedbe1f310983cd826910160c779a4a755377f0.tar.gz
gcc-2dedbe1f310983cd826910160c779a4a755377f0.tar.bz2
(eadd1): Check for overflow on X plus X.
From-SVN: r11782
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/real.c b/gcc/real.c
index b5e2985..3ebf8f3 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -2663,8 +2663,15 @@ eadd1 (a, b, c)
{
if (bi[j] != 0)
{
- /* This could overflow, but let emovo take care of that. */
ltb += 1;
+ if (ltb >= 0x7fff)
+ {
+ eclear (c);
+ if (ai[0] != 0)
+ eneg (c);
+ einfin (c);
+ return;
+ }
break;
}
}