mirror of git://sourceware.org/git/glibc.git
math: Fix UB in ldbl-128 roundl
$ math/test-float128-cospi testing _Float128 (without inline functions) UBSAN: Undefined behaviour in ../sysdeps/ieee754/float128/../ldbl-128/s_roundl.c:75:30 left shift of 1 by 63 cannot be represented in type 'long long int'
This commit is contained in:
parent
9dc7be063e
commit
c1ffff3c53
|
|
@ -72,7 +72,7 @@ __roundl (_Float128 x)
|
|||
/* X is integral. */
|
||||
return x;
|
||||
|
||||
uint64_t j = i1 + (1LL << (111 - j0));
|
||||
uint64_t j = i1 + (1ULL << (111 - j0));
|
||||
if (j < i1)
|
||||
i0 += 1;
|
||||
i1 = j;
|
||||
|
|
|
|||
Loading…
Reference in New Issue