I would have thought that the optimiser would see that p and q are aliased after the `p == q` condition and so not use the written values after that.<p>But yeah aliasing that the compiler can&#x27;t see (if it&#x27;s not doing a stamp based on the equality condition) I can understand why that&#x27;s undefined as what else would you want the compiler to do? Treat all memory as volatile? That would destroy performance.