Only when building with riscv toolchain, because the default optimization used can lead to this problem.