https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119491
--- Comment #11 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> --- Created attachment 61844 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61844&action=edit Patch to make optimization apply to sjlj targets This patch allows musttail3.C and musttail5.C to be tailcall-optimized for sjlj targets. musttail4.C still fails due to getting a different diagnostic than expected: ../../gcc/gcc/testsuite/g++.dg/opt/musttail4.C: In function 'int bar()': ../../gcc/gcc/testsuite/g++.dg/opt/musttail4.C:13:32: error: cannot tail-call: caller uses sjlj exceptions 13 | [[gnu::musttail]] return foo (); // { dg-error "cannot tail-call: call may throw exception that does not propagate" }