about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/dbl-64/mpa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index 3bb8bff90d..aed4354bac 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -871,6 +871,13 @@ __inv (const mp_no *x, mp_no *y, int p)
   z.e = 0;
   __mp_dbl (&z, &t, p);
   t = 1 / t;
+
+  /* t == 0 will never happen at this point, since 1/t can only be 0 if t is
+     infinity, but before the division t == mantissa of x (exponent is 0).  We
+     can instruct the compiler to ignore this case.  */
+  if (t == 0)
+    __builtin_unreachable ();
+
   __dbl_mp (t, y, p);
   EY -= EX;