summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-05-11 10:19:28 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-05-11 08:19:28 +0000
commita2acdf1fb2c4b4c382865c038b18cff6a8ee2dc7 (patch)
treec34e2e1d2cee5e8fa65450b7768d6f6b4fb0a48a /gcc/cgraph.c
parent99b766fc8bf3b91a7e326aeb07792eb33635184d (diff)
downloadgcc-a2acdf1fb2c4b4c382865c038b18cff6a8ee2dc7.tar.gz
cgraph.c (cgraph_mark_reachable_node): Accept references to optimized out extern inlines.
* cgraph.c (cgraph_mark_reachable_node): Accept references to optimized out extern inlines. From-SVN: r159260
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 5f609aaf434..a6aed42517a 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1643,9 +1643,16 @@ cgraph_mark_reachable_node (struct cgraph_node *node)
{
if (!node->reachable && node->local.finalized)
{
- notice_global_symbol (node->decl);
+ if (cgraph_global_info_ready)
+ {
+ /* Verify that function does not appear to be needed out of blue
+ during the optimization process. This can happen for extern
+ inlines when bodies was removed after inlining. */
+ gcc_assert ((node->analyzed || DECL_EXTERNAL (node->decl)));
+ }
+ else
+ notice_global_symbol (node->decl);
node->reachable = 1;
- gcc_assert (!cgraph_global_info_ready);
node->next_needed = cgraph_nodes_queue;
cgraph_nodes_queue = node;