https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96954
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- GCC does not time out nor crash, it is the buggy testcase with infinite recursion that does. With -O2 when it is tail call optimized there is an infinite loop (so hangs), while with -O0 it is not optimized and therefore it segfaults when it runs out of stack.