From 88fe4be8e100bab57f4a451d383babcc737a9806 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 10 Oct 2011 11:59:29 +0000 Subject: [PATCH] re PR middle-end/50638 (emulated TLS fails) PR middle-end/50638 * tree-emutls.c (gen_emutls_addr): Call add_referenced_var. From-SVN: r179745 --- gcc/ChangeLog | 5 +++++ gcc/tree-emutls.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a29ef3b6177..9300fdc8b481 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-10-10 Michael Matz + + PR middle-end/50638 + * tree-emutls.c (gen_emutls_addr): Call add_referenced_var. + 2011-10-10 Richard Sandiford * modulo-sched.c (ps_reg_move_info): Add num_consecutive_stages. diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index c8203f057521..c6f3914bd7eb 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -434,6 +434,7 @@ gen_emutls_addr (tree decl, struct lower_emutls_data *d) addr = create_tmp_var (build_pointer_type (TREE_TYPE (decl)), NULL); x = gimple_build_call (d->builtin_decl, 1, build_fold_addr_expr (cdecl)); gimple_set_location (x, d->loc); + add_referenced_var (cdecl); addr = make_ssa_name (addr, x); gimple_call_set_lhs (x, addr); -- 2.47.3