https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108770
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't see how you could prove arr has a nullptr in it. Ok, with const maybe the compiler could see that but then it needs to record that somehow but there is no way currently.