Commit 62484417 by Jan Hubicka Committed by Jan Hubicka

re PR ipa/61548 (FAIL: gcc.dg/tls/alias-1.c)

	PR ipa/61548
	* tree-emutls.c (ipa_lower_emutls): Avoid duplicates in TLS_VARS.

From-SVN: r220549
parent 106b5466
2015-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/61548
* tree-emutls.c (ipa_lower_emutls): Avoid duplicates in TLS_VARS.
2015-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/63566
* ipa-icf.c (set_local): New function.
(sem_function::merge): Use it.
......
......@@ -753,17 +753,19 @@ ipa_lower_emutls (void)
cgraph_node *func;
bool any_aliases = false;
tree ctor_body = NULL;
hash_set <varpool_node *> visited;
auto_vec <varpool_node *> tls_vars;
/* Examine all global variables for TLS variables. */
FOR_EACH_VARIABLE (var)
if (DECL_THREAD_LOCAL_P (var->decl))
if (DECL_THREAD_LOCAL_P (var->decl)
&& !visited.add (var))
{
gcc_checking_assert (TREE_STATIC (var->decl)
|| DECL_EXTERNAL (var->decl));
tls_vars.safe_push (var);
if (var->alias && var->definition)
if (var->alias && var->definition
&& !visited.add (var->ultimate_alias_target ()))
tls_vars.safe_push (var->ultimate_alias_target ());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment