https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106627
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-08-15 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, not a regression. Using a wrapper function does not fully work either, you need to mark the function as noipa (I suspect the new function for f is being marked as nonthrow for some reason): __attribute__((target("default"))) void f() { throw 1; } __attribute__((target("sse4.2"))) void f() { throw 2; } [[gnu::noipa]] void f1() { f(); } int main() { try { f1(); } catch(... ) { return 0; } return 1; }