https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82319
--- Comment #7 from Yury Gribov <ygribov at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #6) > Shouldn't > ... > catch that? Yes, these are the checks that constant fits into integer type. > Though, for those I think you really don't need itype_fits_ftype_p, > ... > then > the above if you actually round imin and imax to the corresponding real type > away from zero at least should work always. Problem is that then pattern would remove potential inexact/overflow IEEE exceptions. It may be ok under various cmdline flags that control floating point semantics (TODO in pattern mentions that) but I never got to implementing this.