------- Comment #22 from developer at sandoe-acoustics dot co dot uk  
2010-04-03 11:00 -------
Created an attachment (id=20299)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20299&action=view)
finalize emutls control vars before varpool_assemble_ending_decls()

This provides a traverse of the emutls control var htab finalizing each.

It allows the race condition patch to be applied without regression.  

Hopefully, by inspection, it can be seen that targetm.have_tls will bypass this
and, therefore, this should only effect emutls targets.

I didn't try to check if vars were already finalized in the traversal callback
- on the basis that varpool_finalize_decl is efficient at that itself.  

Of course, the disclaimers are:
(a) I'm even newer to this area of gcc than others ;) so...
(b) there might be a much better/more efficient way/place to do this.

Additional:  following Paolo's comments on gcc I've updated emutls_decl() to
copy:
TREE_ADDRESSABLE, DECL_VISIBILITY_SPECIFIED, DECL_PRESERVE_P and DECL_INITAL.

I haven't made the efficiency improvement mod.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43553

Reply via email to