https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108416
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Same behavior with the following so this does seem to be by design
int *p;
void foo ();
void bar ()
{
int i;
p = &i;
//foo ();
}