https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945
--- Comment #32 from Jonathan Wakely <redi at gcc dot gnu.org> --- [basic.stc.general] says global == &w is implementation-defined if global is an invalid pointer value, not just unspecified. GCC could define it to be unspecified, or UB, and even say "it's UB just in this one case where the address was a temporary created under the permission granted by [class.temporary] p3" (although I don't think we do define it that way, we just compare the bits).