Hello all,
I have made a simple programm to represent the double numbers as
the numbers in unsigned long long int format with the same hex content.
Then I calculated the control sum of the array as a sum of the hex codes
(I used the sum of the unsigned long long int numbers).
This programm works correctly when it was compiled with the next optimizations mode:
Optimization -> "empty"; Advanced Optimization -> "empty",
but I got the incorrect results when the same program was compiled with this optimizations mode:
Optimization -> "2"; Advanced Optimization -> "2".
I have got the same results with the Release and with the Debug configurations.
I did not look the mistake in the sourse code.
Please answer on the following questions:
-why the same code gives the different results in the different optimization modes?
-which some more the codes can give the similar results?
The programm is attached.
I used:
Code Composer Studio 5.2.1.00018
mcsdk_2_01_02_06
MDSEVM6678L/MDXEVMPCI board
Best regards,
Viktor