On 11/21/11 18:55, Richard Henderson wrote:
On 11/18/2011 01:24 PM, Aldy Hernandez wrote:
-  if (DECL_COMDAT (new_decl))
+  if (DECL_COMDAT (new_decl)&&  HAVE_COMDAT_GROUP)
      DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
+  else
+    DECL_COMDAT_GROUP (new_decl) = DECL_COMDAT_GROUP (old_decl);

This looks weird -- you're seting D_C_G after H_C_G is false?

We've already done copy_decl anyway -- you should be able to drop the else.


r~

David, can you try the following and see if it fixes the problem on your end?

Index: trans-mem.c
===================================================================
--- trans-mem.c (revision 181588)
+++ trans-mem.c (working copy)
@@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra
   TREE_SYMBOL_REFERENCED (tm_name) = 1;

   /* Perform the same remapping to the comdat group.  */
-  if (DECL_COMDAT (new_decl))
+  if (HAVE_COMDAT_GROUP && DECL_COMDAT (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);
@@ -4233,7 +4233,7 @@ ipa_tm_create_version (struct cgraph_nod
   TREE_SYMBOL_REFERENCED (tm_name) = 1;

   /* Perform the same remapping to the comdat group.  */
-  if (DECL_COMDAT (new_decl))
+  if (HAVE_COMDAT_GROUP && DECL_COMDAT (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);

Reply via email to