This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/3387: GCC 3.0 optimisation -O2 -fPIC produces incorrect code
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, veillard at redhat dot com, wbrack at mmm dot com dot hk
- Subject: Re: optimization/3387: GCC 3.0 optimisation -O2 -fPIC produces incorrect code
- From: sirl at gcc dot gnu dot org
- Date: 9 Sep 2001 17:44:30 -0000
Synopsis: GCC 3.0 optimisation -O2 -fPIC produces incorrect code
State-Changed-From-To: open->feedback
State-Changed-By: sirl
State-Changed-When: Sun Sep 9 10:44:30 2001
State-Changed-Why:
With current gcc-3_0-branch this testcase seems to produce correct code, see below. Can you please verify that the current gcc-3_0-branch works for you in the original context too?
.file "xml2bug.c"
.text
.align 16
.globl bug
.type bug,@function
bug:
pushl %ebp
movl %esp, %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $20, %esp
call .LPR0
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 8(%ebp), %edi
leal 12(%ebp), %esi
pushl %esi
pushl %edi
call f1@PLT
addl $16, %esp
testl %eax, %eax
je .L3
subl $8, %esp
pushl %esi
pushl %edi
call f2@PLT
addl $16, %esp
testl %eax, %eax
je .L3
.L1:
leal -12(%ebp), %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.L3:
subl $8, %esp
pushl %esi
pushl %edi
call f2@PLT
xorl %eax, %eax
jmp .L1
.Lfe1:
.size bug,.Lfe1-bug
.LPR0:
movl (%esp), %ebx
ret
.ident "GCC: (GNU) 3.0.2 20010909 (prerelease)"
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3387&database=gcc