https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87311
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Yes, I think we have quite some opportunistic replacement of traps by "correct" results (according to twos complement). -ftrapv is not getting much love and generally we recommend to use sanitizers these days. Elsewhere it was suggested to lower -ftrapv code to __builtin_()s.