aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-09-17 02:35:22 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-09-17 00:35:22 +0000
commit52b3b3c7e24d8ef6de75310eb4a1437f45c1f469 (patch)
tree17fda233d4a5711e6252ed92e19a57d8be8e4c8c /gcc/lto-cgraph.c
parentff01e2cb4486f4bff6ae371a0bf9a80c3370c4d3 (diff)
downloadgcc-52b3b3c7e24d8ef6de75310eb4a1437f45c1f469.zip
gcc-52b3b3c7e24d8ef6de75310eb4a1437f45c1f469.tar.gz
gcc-52b3b3c7e24d8ef6de75310eb4a1437f45c1f469.tar.bz2
lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when processing clone.
* lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when processing clone. * lto.c (lto_materialize_function): Do not tamper with STATIC and EXTERNAL flags. From-SVN: r164354
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 5410e8f..08607f6 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -956,7 +956,16 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->lowered = bp_unpack_value (bp, 1);
node->analyzed = tag == LTO_cgraph_analyzed_node;
node->in_other_partition = bp_unpack_value (bp, 1);
- if (node->in_other_partition)
+ if (node->in_other_partition
+ /* Avoid updating decl when we are seeing just inline clone.
+ When inlining function that has functions already inlined into it,
+ we produce clones of inline clones.
+
+ WPA partitioning might put each clone into different unit and
+ we might end up streaming inline clone from other partition
+ to support clone we are interested in. */
+ && (!node->clone_of
+ || node->clone_of->decl != node->decl))
{
DECL_EXTERNAL (node->decl) = 1;
TREE_STATIC (node->decl) = 0;