From 9990e02a91ef87f091d324206074b4a263f1fb31 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 29 May 2010 07:32:24 +0000 Subject: [PATCH] Add missing part of previous commit. From-SVN: r160017 --- gcc/cgraphunit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index e7e9e29659e..ab6bf06c01a 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2181,6 +2181,12 @@ cgraph_function_versioning (struct cgraph_node *old_version_node, else new_decl = build_function_decl_skip_args (old_decl, args_to_skip); + cgraph_make_decl_local (new_decl); + /* Generate a new name for the new version. */ + DECL_NAME (new_decl) = clone_function_name (old_decl, clone_name); + SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); + SET_DECL_RTL (new_decl, NULL); + /* Create the new version's call-graph node. and update the edges of the new node. */ new_version_node = -- 2.30.2