https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89561
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- -fsantize=undefined does exactly what 6ou want.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89561
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- -fsantize=undefined does exactly what 6ou want.