https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119958
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Though, I guess testing address of __thread weak for non-NULL or NULL makes no sense. Address of it will be never NULL even when it is not defined. Which is because the instructions compute the thread segment base (which is pretty much always non-NULL) + whatever the relocation resolves to.