There are cases in which the optimization can result in behavior other than segfaulting, see https://research.swtch.com/ub#null
There are cases in which the optimization can result in behavior other than segfaulting, see https://research.swtch.com/ub#null