http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494
--- Comment #15 from Arnaud Lacombe <lacombar at gmail dot com> 2011-05-13 20:14:08 UTC --- trunk from early May also fails with one more "if (outcnt == 1) func ();" line at the end of the function: % ./gcc/cc1 -Os -o - test.c .file "test.c" test Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <early_local_cleanups> <whole-program> <ipa-profile> <cp> <inline> <pure-const> <static-var>Assembling functions: test .text .globl test .type test, @function test: .LFB0: .cfi_startproc movl $0, outcnt(%rip) cmpl $0, outcnt(%rip) je .L1 xorl %eax, %eax jmp func .L1: ret .cfi_endproc .LFE0: .size test, .-test .ident "GCC: (GNU) 4.7.0 20110416 (experimental)" .section .note.GNU-stack,"",@progbits Target and host are x86-64-linux. -O2 and above are fine.