re PR ipa/82256 (clones created by create_version_clone_with_body are not observable...
authorJan Hubicka <hubicka@ucw.cz>
Thu, 18 Jan 2018 16:26:54 +0000 (17:26 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 18 Jan 2018 16:26:54 +0000 (16:26 +0000)
PR ipa/82256
patch by PaX Team
* cgraphclones.c (cgraph_node::create_version_clone_with_body):
Fix call of call_cgraph_insertion_hooks.

From-SVN: r256853

gcc/ChangeLog
gcc/cgraphclones.c

index d1679f4320bdc8b59cf4d711832eab5ec32cc5dc..8f37ed18192b3add5fe2a7daf51caf4e502b4b12 100644 (file)
@@ -1,3 +1,10 @@
+2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/82256
+       patch by PaX Team
+       * cgraphclones.c (cgraph_node::create_version_clone_with_body):
+       Fix call of call_cgraph_insertion_hooks.
+
 2018-01-18  Martin Sebor  <msebor@redhat.com>
 
        * doc/invoke.texi (-Wclass-memaccess): Tweak text.
index 4360feaae60807500bc25a2708010fd4b790239c..6e84a31c1a52b448691a37adf6d2ed6d4f5a013a 100644 (file)
@@ -1007,7 +1007,7 @@ 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);
 
-  symtab->call_cgraph_insertion_hooks (this);
+  symtab->call_cgraph_insertion_hooks (new_version_node);
   return new_version_node;
 }