https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100049
--- Comment #3 from Christophe Lyon <clyon at gcc dot gnu.org> --- Thanks for the prompt answers! I did notice that putting the code into a single source file made behave "as expected". I did check the longjmp docs but unfortunately missed the section describing this case near the end.