This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix emutls code handling aliases
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 May 2012 21:23:22 +0200
- Subject: Fix emutls code handling aliases
Hi,
this patch fixes a bug I apparently intoduced while updating the code for new alias API.
Instead of creating alias of emutls var it now creates alias of target var that leads
to ICE later (or a wrong code when ICE is worked around).
Bootstrapped/regtested x86_64-linux with emutls and comitted.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 187114)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
2012-05-03 Jan Hubicka <jh@suse.cz>
+ PR middle-end/53093
+ * tree-emutls.c (new_emutls_decl): Fix handling of aliases.
+
+2012-05-03 Jan Hubicka <jh@suse.cz>
+
PR middle-end/53106
* ipa.c (cgraph_remove_unreachable_nodes): Fix handling of clones.
Index: tree-emutls.c
===================================================================
--- tree-emutls.c (revision 187011)
+++ tree-emutls.c (working copy)
@@ -338,7 +338,7 @@ new_emutls_decl (tree decl, tree alias_o
else
varpool_create_variable_alias (to,
varpool_node_for_asm
- (DECL_ASSEMBLER_NAME (alias_of))->symbol.decl);
+ (DECL_ASSEMBLER_NAME (DECL_VALUE_EXPR (alias_of)))->symbol.decl);
return to;
}