Reference:
GCC 15.3: Tooling / gnu-toolchains-for-arm · GitLab
GCC 13.2: Tooling / gnu-toolchains-for-arm · GitLabSummary:
g_Module_A_correction_info is shared between the application and the Module_A ISR, but it is not declared volatile. With the same source code and the same -O2 level, the result depends on the compiler version:
g_Module_A_correction_info
volatile
-O2
status = Module_A_CORRECTION_RUN
Module_A_CORRECTION_RUN
scanbuf
status
Module_A_CORRECTION_COMPLETE
Flow code:
[1] is removed by GCC 15.3 -O2. Only [2] is emitted, so the ISR always reads COMPLETE.
[1]
[2]
COMPLETE
Environment / result
Expected: status is CTSU_CORRECTION_RUN while the measurement runs, and the ISR updates scanbuf. Actual: status goes straight to CTSU_CORRECTION_COMPLETE, and the ISR condition is never true.
CTSU_CORRECTION_RUN
CTSU_CORRECTION_COMPLETE
Questions:
--param=dse-max-alias-queries-per-store
Please help me check it.Thank you so much.