[PATCH] Fix PR41357
Jakub Jelinek
jakub@redhat.com
Wed Sep 16 09:54:00 GMT 2009
On Wed, Sep 16, 2009 at 11:28:08AM +0200, Richard Guenther wrote:
> I think the variable should have a proper DECL_TLS_MODEL from the start.
> Where does it get (not) set?
Likely in decl_default_tls_model.
That said, it seems that TLS_MODEL_EMULATED is used by varasm.c for
something else, namely for the artificial variables it creates.
It is something Nathan introduced for vxworks or something, I wasn't aware
of those changes until now.
So, perhaps instead the user decls even when emulated should use the
local/initial exec, local/global dynamic TLS models in SYMBOL_REF_TLS_MODEL.
I believe those symbols normally don't show up in the RTL IL, only in
debug_insns, and dwarf2out.c will handle it right in that case.
Thus just removing that !targetm.have_tls from the condition would suffice.
Jakub
More information about the Gcc-patches
mailing list