https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102515
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- I see - I wonder whether we should do || sanitize_flags_p (SANITIZE_SI_OVERFLOW) for this specific case. For -ftrapv I also really was looking at instrumentation from the frontend rather than from pass_ubsan since that's quite late IMHO and so it doesn't help in removing hysterical avoidance of late "trap" introducing by the middle-end (though we do need to care anyway to not introduce undefined overflow). It also looks like handling ftrapv as Alias(fsanitize=...) doesn't work since we need to alias to two options. Meh ;) Maybe add fsanitize=trapv as a cover option for both. That said, I'm considering to pull the trigger on -ftrapv replacement by ubsan for GCC 12.