http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55812
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-12-26 Component|target |tree-optimization Ever Confirmed|0 |1 Severity|normal |enhancement --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-26 21:57:12 UTC --- The issue is rather the call to _ZTH1v ( __tls_init) than anything else. So it is not TLS accesses which are expensive but rather making sure the thread_local variable has been initialized. I think Jason had proposed an attribute for these function calls but it was rejected IIRC.