Technical information

Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 112
No. a114
P26: BTO-2144 update global loop variables in nested loops
Version Information
V6.1.4/2013.5.5
Details:
BTO-2144 update global loop variables in nested loops;
An optimization for simple, nested loops did not check for the case where one or both of the
loop control variables are defined outside of the function and the inner loop contains a function
call which might use the variables. The global loop control variables were not updated within the
loop and therefore the values were wrong when the function was called.
Example:
unsigned char i, j;
unsigned char array[32][32];
void func(void) { array[origi][origj] ++; }
void test(void) {
for (i = 0; i < 8; i ++)
for (j = 0; j < 16; j ++)
func();
}
With simple, nested loops something very close to the code above is meant.
Command Line
ccrh850 cpu=rh860 c -O
Workaround
For V6.1.4/2013.5.5, please use latest patch
v800-v2013.5.5-comp-P26 or later