[Bug middle-end/106435] constructor of thread_local static member is not called

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 25 22:43:12 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106435

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
I think we can fix this for non-alias targets by building stub functions
instead of the alias. There is a small penalty for size and speed from the
call, but for at least x86 at O2 we sibcall and effectively elide the
__thread_init function for at least one of the direct inits.
... have to tidy up a bit and test more widely.


More information about the Gcc-bugs mailing list