https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116193
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- -y is OK when y == 0 I hope you are not suggesting that it's UB to overflow though. The attribute should make the frontend to lower operations according to semantics and leave everything in the middle-end unaffected.