I've found a bug in the doloop optimization that has to do with how the Ada front end generates code. This occurs on PowerPC and Alpha, it doesn't seem to happen on x86 because this particular optimiation never seems to get hit. The problem is that the Ada front end generates code for "for" loops like: for I in 1 .. Len loop a[i] := b[i]; end loop; The output RTL (in pseudocode) is something like: I := 1; goto loopstart loopcont: i := i + 1; loopstart: a[i] := b[i]; if (i /= Len) then goto loopcont; end if; The doloop optimization doesn't handle this case correctly because the loop variable is incremented after the loop comparison, not before, so doloop optimization will execute the loop one too few times. I've attached a cheap hack that fixes the bug, but it's a cheap hack. How should this really be fixed? -Corey