On Mon, Mar 20, 2023 at 03:15:32PM -0400, Jason Merrill wrote: > > + else if (VAR_P (decl) > > + && CP_DECL_THREAD_LOCAL_P (decl) > > + && (!DECL_EXTERNAL (decl) || flag_extern_tls_init) > > Hmm, I wonder why we don't check the above line in var_needs_tls_wrapper?
It is tested in get_tls_init_fn (one of the 2 previous callers of var_needs_tls_wrapper). No idea why it isn't in get_tls_wrapper_fn (the other caller of it). Jakub