cgraph.c (cgraph_mark_reachable_node): Only enqueue finalized functions.

* cgraph.c (cgraph_mark_reachable_node): Only enqueue finalized
	functions.
	(cgraph_varpool_finalize_decl): Notice global symbol when needed.

From-SVN: r71149
This commit is contained in:
Jan Hubicka 2003-09-07 00:47:19 +02:00 committed by Jan Hubicka
parent 7e668417e9
commit ba245151fc
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,10 @@ Sun Sep 7 00:22:22 CEST 2003 Jan Hubicka <jh@suse.cz>
* toplev.c (rest_of_decl_compilation): Do not finalize external
virables.
* cgraph.c (cgraph_mark_reachable_node): Only enqueue finalized
functions.
(cgraph_varpool_finalize_decl): Notice global symbol when needed.
Sat Sep 6 23:49:13 CEST 2003 Jan Hubicka <jh@suse.cz>
PR target/12070

View File

@ -239,13 +239,13 @@ cgraph_remove_node (struct cgraph_node *node)
void
cgraph_mark_reachable_node (struct cgraph_node *node)
{
if (!node->reachable && DECL_SAVED_TREE (node->decl))
if (!node->reachable && node->local.finalized)
{
notice_global_symbol (node->decl);
node->reachable = 1;
node->next_needed = cgraph_nodes_queue;
cgraph_nodes_queue = node;
notice_global_symbol (node->decl);
/* At the moment frontend automatically emits all nested functions. */
if (node->nested)
@ -486,6 +486,7 @@ cgraph_varpool_finalize_decl (tree decl)
{
node->next_needed = cgraph_varpool_nodes_queue;
cgraph_varpool_nodes_queue = node;
notice_global_symbol (decl);
}
node->finalized = true;