https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106190
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The main difference between GCC 11 and GCC 12 is during ehlowering how try/finally is lowered. Maybe it is due to the patch which fixed PR 101423 (aka r12-2243-g123d0a597beb6d).