https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue is that we isolate a path that is impossible to take but on that path we have p = &foo; free (p); and thus a "proved" mistake. But in reality it is guarded by an effective if (false) condition. So it's not as simple as you think. (we also emit diagnostics on function bodies we do not know are actually never called)