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:
Adhemerval Zanella 2025-05-05 10:48:40 -03:00
parent c1ffff3c53
commit 8175ef182f
1 changed files with 1 additions and 1 deletions

View File

@ -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 */