(eadd1): Check for overflow on X plus X.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 15 Apr 1996 12:06:07 +0000 (08:06 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 15 Apr 1996 12:06:07 +0000 (08:06 -0400)
From-SVN: r11782

gcc/real.c

index b5e2985965885b95448cf89767dcff0d970fba98..3ebf8f32e7a1995114482386f14935c73e973da4 100644 (file)
@@ -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;
                }
            }