This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/18612] Loop optimiser generates incorrect code.
- From: "tom at hukatronic dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2005 15:58:10 -0000
- Subject: [Bug rtl-optimization/18612] Loop optimiser generates incorrect code.
- References: <20041122191154.18612.gccbug@sarek.cc>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tom at hukatronic dot cz 2005-06-10 15:58 -------
This seems to be fixed in GCC 4.0.0. This is the code produced by GCC 4.0.0 with following command
line:
~/Projects/gcc_m68k/bin/m68k-bsd-elf-gcc -S -O3 -m68000 -msoft-float -fno-exceptions -fno-
inline test.c
func:
link.w %fp,#0
move.l %a2,-(%sp)
lea Array,%a2
tst.b (%a2)
jbeq .L5
jbra .L13
.L12:
tst.b (%a2)
jbeq .L5
.L13:
jbsr func2
.L5:
addq.l #1,%a2
cmp.l #Array+6,%a2
jbne .L12
move.l -4(%fp),%a2
unlk %fp
rts
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18612