https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81906
Marc Glisse <glisse at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Last reconfirmed| |2017-08-20 Resolution|INVALID |--- Summary|Calls to rint() wrongly |[7/8 Regression] Calls to |optimized away starting in |rint() wrongly optimized |g++ 6 |away starting in g++ 6 Ever confirmed|0 |1 --- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- Indeed you want -frounding-math, and with gcc-6 that makes things work, but starting with gcc-7 it doesn't anymore. (gimple looks fine, the problem comes later)