diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 70b28616c72..a26d6ddbc8b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-10-08 Jan Hubicka + + PR bootstrap/41620 + * ipa.c (cgraph_externally_visible_p, + function_and_variable_visibility, + whole_program_function_and_variable_visibility): Skip non-finalized + nodes. + 2009-10-08 Nick Clifton * config/mn10300/mn10300.h (CONSTANT_ADDRESS_P): Do not allow diff --git a/gcc/ipa.c b/gcc/ipa.c index 50eade08cdd..c859242fa70 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -254,6 +254,8 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file) static bool cgraph_externally_visible_p (struct cgraph_node *node, bool whole_program) { + if (!node->local.finalized) + return false; if (!DECL_COMDAT (node->decl) && (!TREE_PUBLIC (node->decl) || DECL_EXTERNAL (node->decl))) return false; @@ -312,6 +314,8 @@ function_and_variable_visibility (bool whole_program) } for (vnode = varpool_nodes_queue; vnode; vnode = vnode->next_needed) { + if (!vnode->finalized) + continue; if (vnode->needed && (DECL_COMDAT (vnode->decl) || TREE_PUBLIC (vnode->decl)) && (!whole_program @@ -392,7 +396,7 @@ whole_program_function_and_variable_visibility (void) function_and_variable_visibility (flag_whole_program); for (node = cgraph_nodes; node; node = node->next) - if (node->local.externally_visible) + if (node->local.externally_visible && node->local.finalized) cgraph_mark_needed_node (node); for (vnode = varpool_nodes_queue; vnode; vnode = vnode->next_needed) if (vnode->externally_visible)