https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106568
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Can you try -fno-reorder-blocks-and-partition adding to the options? This would not be the first time this option caused issues with EH.