diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-21 23:02:15 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-21 23:02:15 +0000 |
commit | a5c9e220e012d7ed8ed4718d6ab133afa904873a (patch) | |
tree | f3c758622a05bf79b5f0011c4175e3603ea18de3 /gcc/tree-emutls.c | |
parent | 0acc46e324abed7163031ed0bb257402812881c2 (diff) | |
download | gcc-a5c9e220e012d7ed8ed4718d6ab133afa904873a.tar.gz |
PR target/46510
* tree-emutls.c (get_emutls_init_templ_addr, new_emutls_decl): Do not
finalize external decls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-emutls.c')
-rw-r--r-- | gcc/tree-emutls.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index 2a1ec068a85..899888dfb10 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -257,7 +257,12 @@ get_emutls_init_templ_addr (tree decl) targetm.emutls.tmpl_section); } - varpool_finalize_decl (to); + /* Create varpool node for the new variable and finalize it if it is + not external one. */ + if (DECL_EXTERNAL (to)) + varpool_node (to); + else + varpool_finalize_decl (to); return build_fold_addr_expr (to); } @@ -324,7 +329,12 @@ new_emutls_decl (tree decl) record_references_in_initializer (to, false); } - varpool_finalize_decl (to); + /* Create varpool node for the new variable and finalize it if it is + not external one. */ + if (DECL_EXTERNAL (to)) + varpool_node (to); + else + varpool_finalize_decl (to); return to; } |