+2012-05-25 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/53008
+ * trans-mem.c (ipa_tm_create_version_alias): Output new_node if
+ accessed indirectly.
+ (ipa_tm_create_version): Same.
+
2012-05-25 Uros Bizjak <ubizjak@gmail.com>
PR target/53474
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O" } */
+
+void __attribute__((transaction_safe)) (*fn)(void);
+
+static void __attribute__((transaction_safe))
+foo(void)
+{
+}
+
+void set_fn(void)
+{
+ fn = foo;
+}
record_tm_clone_pair (old_decl, new_decl);
- if (info->old_node->symbol.force_output)
+ if (info->old_node->symbol.force_output
+ || ipa_ref_list_first_referring (&info->old_node->symbol.ref_list))
ipa_tm_mark_force_output_node (new_node);
return false;
}
record_tm_clone_pair (old_decl, new_decl);
cgraph_call_function_insertion_hooks (new_node);
- if (old_node->symbol.force_output)
+ if (old_node->symbol.force_output
+ || ipa_ref_list_first_referring (&old_node->symbol.ref_list))
ipa_tm_mark_force_output_node (new_node);
/* Do the same thing, but for any aliases of the original node. */