[Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
lacombar at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri May 13 20:51:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list