https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97415
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed on trunk so far. I'm undecided whether it needs to be backported. Although the comparison with null is formally unspecified, I think all the compilers we support behave as expected.