The more I read stuff like this, the more I come to the conclusion that actual security critial real time software should probably be compiled without any (agressive) optimisations
Edit: https://store.developer.arm.com/store/embedded-iot-software-...