When you&#x27;re saying that the compiler should be allowed to optimise under the assumption that OOB array accesses don&#x27;t clobber other variables, this means that OOB array accesses can make very weird things happen indeed.  For example:<p><pre><code>  if (a &gt; 1)
      b++;
  array[b] = 0;
  if (a &gt; 1)
      foo(a);
</code></pre>
We might see foo() called with argument 0 when that&#x27;s apparently impossible - the OOB write has apparently &quot;reached forward&quot; (it can also &quot;reach backward&quot;).<p>This is why it ends up just being &quot;undefined behaviour&quot; - to do better either you have to somehow exhaustively document all the kinds of weird things that can happen (&quot;it writes to the memory&quot; isn&#x27;t enough, because of the way that can interact with the optimiser) or you have to unreasonably constrain the optimiser.