This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, updated] Fix PR44132/PR43602 - was Re: [patch] fix PR43602 for emutls targets.
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Date: Sun, 23 May 2010 17:59:30 +0100
- Subject: [Patch, updated] Fix PR44132/PR43602 - was Re: [patch] fix PR43602 for emutls targets.
- References: <8782417E-616E-4AD9-9B7A-DE8B7D84480C@sandoe-acoustics.co.uk> <4BE9661E.6050000@google.com>
On 11 May 2010, at 15:13, Diego Novillo wrote:
<snip old patch>
The patch looks OK otherwise. TLS is not my area, though. Jakub,
could
you double check?
Jakub commented in...
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00826.html
... that (other than formatting and comment issues) he thought it OK.
I hope I've now addressed formatting/commenting correctly.
This should reduce test-suite noise and restore emutls functionality
until we can finish moving the variable substitution to a more
appropriate place.
Discussion of the latter will carry on on PR44132 thread (I'm making
progress, but slowly).
This current patch would be part of the overall solution anyway, I
believe.
Minor additions to the PR4306 version (other than commenting)
1/ Setting DECL_PRESERVE_P to work around PR44132 (that addition
agreed in the PR thread, but requires all of this patch to clear the
PR).
copy DECL_RESTRICTED_P (for FORTRAN). The init template is read-
only - it doesn't need to be marked as thread-local.
2/ guarding the emutls finalization, such that it is only carried out
in emutls_finish () if it has not been done earlier.
tested on i686-apple-darwin9 and x86_86-apple-darwin10.
Iain
gcc/Changelog:
PR target/44132
PR middle-end/43602
* varasm.c (get_emutls_init_templ_addr): Copy
DECL_VISIBILITY_SPECIFIED,
DECL_PRESERVE_P.
(emutls_decl): Copy DECL_VISIBILITY_SPECIFIED, DECL_RESTRICTED_P,
and set DECL_PRESERVE_P.
(emutls_finalize_control_var): New callback.
(emutls_finish): Finalize emutls control variables.
* toplev.c (compile_file): Move the call to emutls_finish () before
varpool_assemble_pending_decls ().
Attachment:
159759-PR44132-43602-diff.txt
Description: Text document