https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109134
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Having that extra TYPE_OVERFLOW_SANITIZED really isn't sustainable. But the main issue is that the instrumentation happens after (some) folding has taken place. We probably also have still code second-guessing TYPE_OVERFLOW_UNDEFINED if !TYPE_OVERFLOW_WRAPS or the other way around - it would be best to transition to TYPE_OVERFLOW_BEHAVIOR () yielding an enum, there can only be one of { wraps, undefined, traps, sanitized } and transforms relying on undefined overflow shall not trigger when it's 'sanitized'. If it were not for the second-guessing code then adjusting TYPE_OVERFLOW_UNDEFINED to false when sanitizing should work (but TYPE_OVERFLOW_WRAPS should still return false as well!). It might also work to magically switch back to undefined after instrumentation.