Technical information
Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 41
No. a30
Wrong address calculation
Version Information
V3.5.1
Details
The compiler makes wrong address calculation. A peephole optimization mixes up the
calculation of the index variable 'channel' with the base address of two arrays.
Example:
test.c:
struct {
unsigned short One ;
unsigned short Two ;
} flagArray[5];
struct {
volatile unsigned short *pModule[5];
} Register;
int GetStatus(int channel)
{
int result = flagArray[channel].One;
if (flagArray[channel].Two)
result |= 2;
else if ( Register.pModule[channel][0] & 0x0002)
result |= 8;
else if ( Register.pModule[channel][0] & 0x0800)
result |= 4;
GetPSW();
}
Command Sequence
ccv850e -passsource -Ospace test.c -S -registermode=22
-prepare_dispose










