This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
there seems to be a problem in the new CG Tools versions.
This is my function:
int copy(const unsigned char *pSrc, char *pDst)
{
int i = 0;
for (i=0; i<8; i++)
pDst[i] = pSrc[i];
return 0;
}
The order of the stored values in pDst is inverse within every 4 bytes.
This is a test call:
char text[20];
copy((unsigned char *)"12345678", text);
text[8] = '\0';
printf("%s\n", text);
The output of the program is:
43218765
Used compiler options:
-g -q -o2 -mv6400
Regards,
Ralf
Ralf,
I can reproduce this. It seems to be a bug triggered at -o2, as other optimization levels work fine. I will submit a bug report against the optimizer and then update this post with the bug number.