https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119958
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #8) > 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. In fact LLVM starting in 16, removes the test of non-NULL .