This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/61393] [trans-mem] O3 optimization level constant propagation problem
- From: "jamborm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jun 2014 15:48:32 +0000
- Subject: [Bug ipa/61393] [trans-mem] O3 optimization level constant propagation problem
- Auto-submitted: auto-generated
- References: <bug-61393-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61393
--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Alexander, as a temporary workaround, you can use -fno-ipa-cp.
The problem (also present in the trunk) seems to be that the tm_clone
flag of cgrapn_node is not copied over to clones (of tm_clones).
Thus, the following patch "fixes" the testcase:
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index 4387b99..056d82b 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -562,6 +562,7 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
set_new_clone_decl_and_node_flags (new_node);
new_node->clone.tree_map = tree_map;
new_node->clone.args_to_skip = args_to_skip;
+ new_node->tm_clone = old_node->tm_clone;
/* Clones of global symbols or symbols with unique names are unique. */
if ((TREE_PUBLIC (old_decl)
However, I do not really know what the semantics of that flag mean so
at least for now I am not going to propose this (I am also not quite
sure this is the best place for the copy). What properties of a
function should be maintained in order to keep it flagged as a tm
clone?