Building with --enable-ubasn triggers:
$ math/test-ldouble-isinf
UBSAN: Undefined behaviour in ../sysdeps/x86/fpu/s_isinfl.c:25:8 negation of
2147483648 cannot be represented in type 'int'
Also move the isinfl implementation to sysdeps/x86 and remove the
sysdeps/x86_64 version.
int __isinfl(long double x)
{
- int32_t se,hx,lx;
+ int se;
+ unsigned int hx, lx;
GET_LDOUBLE_WORDS(se,hx,lx,x);
/* This additional ^ 0x80000000 is necessary because in Intel's
internal representation of the implicit one is explicit. */
lx |= (hx ^ 0x80000000) | ((se & 0x7fff) ^ 0x7fff);
lx |= -lx;
se &= 0x8000;
- return ~(lx >> 31) & (1 - (se >> 14));
+ return ~((int)lx >> 31) & (1 - (se >> 14));
}
hidden_def (__isinfl)
weak_alias (__isinfl, isinfl)
+++ /dev/null
-#include <sysdeps/i386/fpu/s_isinfl.c>