diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a29ef3b617..9300fdc8b48 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 c8203f05752..c6f3914bd7e 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);