From 43042ea70130d9c8648a5b92c9030445ab1403d7 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Tue, 29 Nov 2011 16:32:28 +0000 Subject: [PATCH] trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl if DECL_ONE_ONLY. 2011-11-21 David Edelsohn Aldy Hernandez * trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl if DECL_ONE_ONLY. (ipa_tm_create_version): Same. Co-Authored-By: Aldy Hernandez From-SVN: r181807 --- gcc/ChangeLog | 7 +++++++ gcc/trans-mem.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a6765d4dec..bfefccb9ed4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-21 David Edelsohn + Aldy Hernandez + + * trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl + if DECL_ONE_ONLY. + (ipa_tm_create_version): Same. + 2011-11-29 Bernd Schmidt * haifa-sched.c (recompute_todo_spec): Simplify and correct the diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 751572c4fb4..9751a15a4d2 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -4213,7 +4213,7 @@ ipa_tm_create_version_alias (struct cgraph_node *node, void *data) TREE_SYMBOL_REFERENCED (tm_name) = 1; /* Perform the same remapping to the comdat group. */ - if (DECL_COMDAT (new_decl)) + if (DECL_ONE_ONLY (new_decl)) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl)); new_node = cgraph_same_body_alias (NULL, new_decl, info->new_decl); @@ -4248,7 +4248,7 @@ ipa_tm_create_version (struct cgraph_node *old_node) TREE_SYMBOL_REFERENCED (tm_name) = 1; /* Perform the same remapping to the comdat group. */ - if (DECL_COMDAT (new_decl)) + if (DECL_ONE_ONLY (new_decl)) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl)); new_node = cgraph_copy_node_for_versioning (old_node, new_decl, NULL, NULL);