This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40718] Invalid code produced with -foptimize-sibling-calls
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2009 12:08:30 -0000
- Subject: [Bug target/40718] Invalid code produced with -foptimize-sibling-calls
- References: <bug-40718-16926@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from ubizjak at gmail dot com 2009-08-23 12:08 -------
Patched gcc compiles testcase from comment 8 to:
_ZN5Stuff8do_stuffEmm:
.LFB4:
.cfi_startproc
.cfi_personality 0x0,__gxx_personality_v0
pushl %ebp
.cfi_def_cfa_offset 8
movl %esp, %ebp
.cfi_offset 5, -8
.cfi_def_cfa_register 5
pushl %ebx
subl $4, %esp
movl 12(%ebp), %eax
cmpl $-2, %eax
je .L2
.cfi_offset 3, -12
movl glo_ptr_to_base, %edx
movl (%edx), %ebx
movl %edx, 8(%ebp)
movl (%ebx), %edx
movl -4(%ebp), %ebx
leave
.cfi_remember_state
.cfi_restore 5
.cfi_def_cfa 4, 4
.cfi_restore 3
jmp *%edx
.L2:
.cfi_restore_state
movl -4(%ebp), %ebx
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
.cfi_restore 3
ret $12
.cfi_endproc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40718