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.

TMS320F280041: Does the compiler optimization level affect the result of arithmetic operation and how to avoid?

Part Number: TMS320F280041


Hi expert, 

The customer did the following arithmetic operations with no optimization and with optimization level of 3, respectively. 

Unexpectedly, the results of the above two situations are different. If turning on the optimization, the "t_f32Temp552" equals to 0x3F3DE3DF while the "t_f32Temp55max" equals to 0x3F3DE3DE, as you can see from the following figure. However, if turning off the optimization, they both equal to 0x3F3DE3DE. 

 (with optimization level of 3)

By the way, the version of customer's CCS is v7.3.0,  and the version of  CGT is showing below: 

The customer wants to know how to avoid this problem.