https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106057
--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> --- C only testcase (also misoptimized in clang) #include <setjmp.h> int b; jmp_buf buf; __attribute__((noinline)) int maybethrow() { if (!b) longjmp (buf,1); return 2; } void test(int *a) { *a=1; *a=maybethrow(); } int main() { int a=-1; if (setjmp (buf) == 1) { if (a!=1) __builtin_abort (); return 0; } test (&a); return 0; }