This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/11304] [3.3 Regression] Wrong code production with -fomit-frame-pointer
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2003 11:10:56 -0000
- Subject: [Bug optimization/11304] [3.3 Regression] Wrong code production with -fomit-frame-pointer
- References: <20030624072217.11304.manuel.serrano@sophia.inria.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11304
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Summary|Wrong code production with -|[3.3 Regression] Wrong code
|fomit-frame-pointer |production with -fomit-
| |frame-pointer
------- Additional Comments From pinskia at physics dot uc dot edu 2003-06-24 11:10 -------
On the mainline (20030623) I get correct code:
tin:~/src/gnu/gcctest>gcc -O2 -fomit-frame-pointer -S -o - pr11304.c -march=i386 -
mtune=i386
.file "pr11304.c"
.text
.p2align 2,,3
.globl hux
.type hux, @function
hux:
pushl %ebx
subl $8, %esp
movl 16(%esp), %ebx
testl %ebx, %ebx
je .L2
subl $12, %esp
pushl $4
call foo
addl $16, %esp
addl $8, %esp
movl %ebx, %eax ;<--- here eax is reloaded
popl %ebx
ret
.p2align 2,,3
.L2:
subl $12, %esp
pushl $0
call failure_then_exit
addl $16, %esp
addl $8, %esp
popl %ebx
ret
.size hux, .-hux
.section .note.GNU-stack,"",@progbits
.ident "GCC: (GNU) 3.4 20030623 (experimental)"
But in 3.3.1 (20030616), 3.2.2, and 3.2.3, I get the wrong code.