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 target/17019] THUMB -O1: bad code generated for simple for loop


------- Additional Comments From danfuzz at milk dot com  2004-08-13 17:18 -------
The bug still seems to happen with 3.4.1. For the record, here's the assemby code that I think is in 
error:

badness:
        push    {r4, r5, lr}
        mov     r4, #1
        neg     r4, r4
        // probably missing a test here
        bmi     .L7

That is, the code correctly initializes r4 to -1, but then always branches around the loop because the 
branch condition is always true.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17019


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