OSDN Git Service

* cgraph.c (cgraph_mark_reachable_node): Only enqueue finalized
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Sep 2003 22:47:19 +0000 (22:47 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Sep 2003 22:47:19 +0000 (22:47 +0000)
functions.
(cgraph_varpool_finalize_decl): Notice global symbol when needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71149 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraph.c

index 610bbb0..2f265b7 100644 (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
index 8b4c0cc..4eaa60e 100644 (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;