Okay, that makes much more sense 
If you get different behavior when optimizing versus not, either your code, or the compiler, is terribly broken, and you need to spend some time toggling that on and off and observing the behaviors, to figure out which it is.
If you just ignore that and sweep it under the rug, there will be some part of your development process that you don’t understand, and that will lurk like an iceberg under the water and kill you sometime later.