http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59017
--- Comment #1 from Shlomi Fish <shlomif at shlomifish dot org> --- Created attachment 31171 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31171&action=edit The .c file This is the offending .c file . I forgot to note that the problem is that the executable gets stuck after the first printf(...) due to a jmp instruction. It works fine if no optimisation flags are applied.