https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80320
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For not emitting the guard: #define NEEDS_GUARD_P(decl) (TREE_PUBLIC (decl) && (DECL_COMMON (decl) \ || DECL_ONE_ONLY (decl) \ || DECL_WEAK (decl))) Since the decl is extern, so none of those are true. But I think it should get that far for this variable. I have not looked fully in the front-end to understand this code further.