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.

Issues with code when using "-O3" and "--symdebug:none" compiler options.

Hi,

I noticed some issues with our code when using "-O3" and "--symdebug:none" compiler options.
When using no optimization and "-g" options everything looks OK.

Originally I thought we might be having some issues when using optimization but when I used "-O3" with debug "-g", the problem went away.

Overall I tried the follwowing:
- "-O3" and "--symdebug:none" - FAIL
- "-O2" and "--symdebug:none" - FAIL
- "-O1" and "--symdebug:none" - PASS
- "-O3" and "-g"                              - PASS

According to documentation "-O3" and "-O2" enable SW pipelining.
I used "-al" option to view assembly and see where SW pipelining is used. I disabled pipelining in those loops by slight modifying them but the problem was still present.


Do you have any ideas what could cause the issues I'm seeing?

How "-O2" and "-O3" options affect the code?

Why "-O3" with "-g" option works?


Thanks