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/15927] New: THUMB -O2: strength-reduced iteration variable ends up off by 1


When compiling a particular function with -O2 and targetting THUMB, I found that the compiler 
generated incorrect code. In particular it looks like an iteration variable that was strength-reduced ends 
up off by one: In each iteration, the value used for the variable in question appears to be the value that 
ought to be used in the *subsequent* iteration.

The line in question that gets erroneously compiled is:

    ic = scan->ics[n];

I'll attach the raw source (pared down but still verified to compile) and the annotated assembly file as 
soon as I figure out how to do that with bugzilla.

-- 
           Summary: THUMB -O2: strength-reduced iteration variable ends up
                    off by 1
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danfuzz at milk dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-mac-osx
  GCC host triplet: powerpc-mac-osx
GCC target triplet: arm-unknown-elf


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


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