summaryrefslogtreecommitdiffstats
path: root/gcc/real.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-04-15 12:06:07 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-04-15 12:06:07 +0000
commit5bbe93b9caa9d82af163465cffc63b83df2e1219 (patch)
tree9962362880b2293be8db2a3ad013760aa318f869 /gcc/real.c
parentd4baeab8c110019e02ea57fbe2f96e76f26dd1b4 (diff)
downloadppe42-gcc-5bbe93b9caa9d82af163465cffc63b83df2e1219.tar.gz
ppe42-gcc-5bbe93b9caa9d82af163465cffc63b83df2e1219.zip
(eadd1): Check for overflow on X plus X.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11782 138bc75d-0d04-0410-961f-82ee72b054a4
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 b5e29859658..3ebf8f32e7a 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;
}
}
OpenPOWER on IntegriCloud