aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-06-26 10:15:18 +0000
committerJan Hubicka <jh@suse.cz>2012-06-26 10:15:18 +0000
commit2709bcae799b98b2189f1887d28ad434154e346f (patch)
tree82c2307a74f08fda6d0e7d0e0e6cfc219fb048d6 /gcc/cgraph.h
parentb531edcae4d0fa183ca0cb940460962f4e9fbb3c (diff)
PR lto/53572
* cgraph.h (varpool_can_remove_if_no_refs): Fix handling of used symbols. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@188982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 0dec33f7757..7b9098bad04 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1126,7 +1126,8 @@ varpool_can_remove_if_no_refs (struct varpool_node *node)
if (DECL_EXTERNAL (node->symbol.decl))
return true;
return (!node->symbol.force_output && !node->symbol.used_from_other_partition
- && (DECL_COMDAT (node->symbol.decl)
+ && ((DECL_COMDAT (node->symbol.decl)
+ && !symtab_used_from_object_file_p ((symtab_node) node))
|| !node->symbol.externally_visible
|| DECL_HAS_VALUE_EXPR_P (node->symbol.decl)));
}