This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/82256] New: regression: clones created by create_version_clone_with_body are not observable to insertion hooks
- From: "pageexec at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Sep 2017 13:47:27 +0000
- Subject: [Bug ipa/82256] New: regression: clones created by create_version_clone_with_body are not observable to insertion hooks
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82256
Bug ID: 82256
Summary: regression: clones created by
create_version_clone_with_body are not observable to
insertion hooks
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: pageexec at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
the following
commit 35ee1c662b92e8c6475d4eab310bf33371708a28
Author: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon Aug 25 13:01:47 2014 +0000
IPA C++ refactoring 4/N
introduced a presumably unintended change in
cgraph_node::create_version_clone_with_body:
@@ -970,14 +972,14 @@ cgraph_node::create_version_clone_with_body
/* Update the call_expr on the edges to call the new version node. */
update_call_expr (new_version_node);
- new_version_node->call_function_insertion_hooks ();
+ symtab->call_cgraph_insertion_hooks (this);
return new_version_node;
}
notice how 'this' is passed to call_cgraph_insertion_hooks instead of the
previously passed new_version_node. this makes new nodes unobservable to such
hooks and also makes 'this' observed as many times as these clones are created,
both broke existing behaviour i think. the correct change should be:
symtab->call_cgraph_insertion_hooks (new_version_node);
i hope this can be fixed in time for the last 5.x release (and of course also
all the newer versions, master is affected).