https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83253
--- Comment #7 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- Thanks, Jakub, good catch on the HWI overflow. I'll make those changes and re-test. FWIW, the patch as proposed above passes regstrap and will be good enough for testing whether this indeed is the right approach, so we can do that in parallel. (I think we probably already passed the tree_fits_shwi test upstream in the logic, but it is best to be conservative here.)