mirror of git://sourceware.org/git/glibc.git
math: Fix UB in ldbl-128 powl
testing _Float128 (without inline functions) UBSAN: Undefined behaviour in ../sysdeps/ieee754/float128/../ldbl-128/e_powl.c:439:11 left shift of 4294953849 by 16 cannot be represented in type 'int'
This commit is contained in:
parent
c1ffff3c53
commit
8175ef182f
|
@ -436,7 +436,7 @@ __ieee754_powl (_Float128 x, _Float128 y)
|
|||
z = one - (r - z);
|
||||
o.value = z;
|
||||
j = o.parts32.w0;
|
||||
j += (n << 16);
|
||||
j += ((uint32_t)n << 16);
|
||||
if ((j >> 16) <= 0)
|
||||
{
|
||||
z = __scalbnl (z, n); /* subnormal output */
|
||||
|
|
Loading…
Reference in New Issue