This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/11012] [m32r-elf] wrong code with -O at branch of conditional
- From: "emarty at nexwave-solutions dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2003 11:13:59 -0000
- Subject: [Bug target/11012] [m32r-elf] wrong code with -O at branch of conditional
- References: <20030528083817.11012.inaoka.kazuhiro@renesas.com>
- 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=11012
------- Additional Comments From emarty at nexwave-solutions dot com 2003-10-31 11:13 -------
1) I confirm the problem exists on gcc 3.3.2 (release).
2) As per PR 11451, using "-O -fno-if-conversion" produces correct code (still
using gcc 3.3.2) :
main:
; PROLOGUE, vars= 0, regs= 1, args= 0, extra= 0
push lr
ldi r5,#0 ; 0x0
ld24 r4,#status
st r5,@(r4)
ld24 r4,#ca+8
ldb r4,@(r4)
ldi r1,#8 ; 0x8
bnez r4,.L52
ldi r1,#0 ; 0x0
.L52:
ldi r0,#0 ; 0x0
ldi r2,#8 ; 0x8
bl func
ld24 r4,#status
ld r0,@(r4)
; EPILOGUE
pop lr
jmp lr