A classic problem is code like this:<p><pre><code>    printf(&quot;a=%p *a=%d&quot;, a, *a);
    if (a == NULL) return;
</code></pre>
An optimizing compiler will likely remove the NULL check completely because the printf above it has undefined behavior if a is NULL.