This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/18612] Loop optimiser generates incorrect code.


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]