summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-05 21:54:06 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-05 21:54:06 +0000
commitf014e39d49d0f72c4ec12c0b3a6ff21c40349088 (patch)
tree455a7dd2b93b6aa29952096e28035c3b04b31ee9 /gcc/cgraphunit.c
parent99e9b19fc990b183d35c2f9988ae6712cec6e68e (diff)
downloadgcc-f014e39d49d0f72c4ec12c0b3a6ff21c40349088.tar.gz
PR c++/39106
* cgraphunit.c (cgraph_function_versioning): Clear also DECL_VIRTUAL_P on the copied decl. * g++.dg/opt/thunk3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index cd58c2aae0b..586ed61c2ae 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1551,10 +1551,11 @@ cgraph_function_versioning (struct cgraph_node *old_version_node,
TREE_PUBLIC (new_version_node->decl) = 0;
DECL_COMDAT (new_version_node->decl) = 0;
DECL_WEAK (new_version_node->decl) = 0;
+ DECL_VIRTUAL_P (new_version_node->decl) = 0;
new_version_node->local.externally_visible = 0;
new_version_node->local.local = 1;
new_version_node->lowered = true;
-
+
/* Update the call_expr on the edges to call the new version node. */
update_call_expr (new_version_node);