This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35616] [4.1/4.2/4.3/4.4 Regression] Incorrect code while O2 compling
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Mar 2008 14:34:14 -0000
- Subject: [Bug target/35616] [4.1/4.2/4.3/4.4 Regression] Incorrect code while O2 compling
- References: <bug-35616-15933@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from ubizjak at gmail dot com 2008-03-18 14:34 -------
asm dump with GCC: (GNU) 4.4.0 20080318 (experimental) and -O2
-fomit-frame-pointer:
function_calling_listener:
movl 20(%esp), %eax # data.d, data.d
movl 16(%esp), %ecx # data.c, data.c
movl %eax, 12(%esp) # data.d,
movl %ecx, 8(%esp) # data.c,
jmp *%ecx # data.c
-O0:
function_calling_listener:
pushl %ebx #
subl $24, %esp #,
movl 36(%esp), %ebx # data.listener, D.1190
movl 48(%esp), %eax # data.d, D.1191
movl 44(%esp), %edx # data.c, D.1192
movl 32(%esp), %ecx # data.a, D.1193
movl %eax, 8(%esp) # D.1191,
movl %edx, 4(%esp) # D.1192,
movl %ecx, (%esp) # D.1193,
call *%ebx # D.1190
addl $24, %esp #,
popl %ebx #
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35616