> 1. With compiler optimization disabled, OpenSSL 1.0.2d function worked > as it is. Another indication in favour of compiler bug is that it worked when you added printf. It's similar to quantum physics when by measuring you force particle to specific state. But understand me correctly. I'm not saying that quantum physics apply in this case, it's just a *fun* way to look at it. As compiler doesn't know what printf does, it's forced to normalize value for "measurement". Same essentially applies to volatilization. I mean variables declared volatile are meant for *external* consumption/"measurement".