https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107754
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note in the origin "reduced" testcase, we had a conditional null pointer which was exposing the null pointer at -O2 due to optimizations.