AnsweredAssumed Answered

KDS: variable optimized out when compile with O2 and LTO option

Question asked by huang xiaofeng on May 29, 2018
Latest reply on Jun 6, 2018 by huang xiaofeng

Hi all. I have two questions.

In the startup.c file, the stack pointer declaration _SP_INIT as char[], when I add LTO option with linker, there's a warning: "warning: type of '__SP_INIT' does not match original declaration", I want to disable it, and not know how?

does not match original declaration warning on _SP_INIT declaration


And the second one is that, when compiled with O2, I found a locale variable is optimized out which used in asm instructions. So, my question is that, how to avoid this in ALL of source files generated by Processor Export?

local variable optimized out used in asm