https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120631
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:e3cf9e55e394de211617333bbc3419c248d3e6b6 commit r14-11853-ge3cf9e55e394de211617333bbc3419c248d3e6b6 Author: Jakub Jelinek <[email protected]> Date: Thu Jun 19 08:57:27 2025 +0200 dfp: Further decimal_real_to_integer fixes [PR120631] Unfortunately, the following further testcase shows that there aren't problems only with very large precisions and large exponents, but pretty much anything larger than 64-bits. After all, before _BitInt support dfp didn't even have {,unsigned }__int128 <-> _Decimal{32,64,128,64x} support, and the testcase again shows some of the conversions yielding zeros. While the pr120631.c test worked even without the earlier patch. So, this patch assumes 64-bit precision at most is ok and for anything larger it just uses exponent 0 and multiplies afterwards. 2025-06-19 Jakub Jelinek <[email protected]> PR middle-end/120631 * dfp.cc (decimal_real_to_integer): Use result multiplication not just when precision > 128 and dn.exponent > 19, but when precision > 64 and dn.exponent > 0. * gcc.dg/dfp/bitint-10.c: New test. * gcc.dg/dfp/pr120631.c: New test. (cherry picked from commit e2eb9da5546b5e2fccb86586cda3beee8f69f5c9)
