From: Jan Hubicka Date: Thu, 7 Oct 2010 10:52:34 +0000 (+0200) Subject: re PR middle-end/45926 (Revision 165057 breaks GOMP) X-Git-Tag: upstream/12.2.0~89661 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd67cff183ab44d9a243ce983e236e4a0be17ac3;p=platform%2Fupstream%2Fgcc.git re PR middle-end/45926 (Revision 165057 breaks GOMP) PR middle-end/45926 * ipa.c (cgraph_remove_unreachable_nodes): Revert my previous patch. From-SVN: r165090 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4089132..0652cf0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-07 Jan Hubicka + + PR middle-end/45926 + * ipa.c (cgraph_remove_unreachable_nodes): Revert my previous patch. + 2010-10-07 Richard Guenther PR bootstrap/45914 diff --git a/gcc/ipa.c b/gcc/ipa.c index 4fbc3b7..8eadd36 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -238,19 +238,14 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file) #endif varpool_reset_queue (); for (node = cgraph_nodes; node; node = node->next) - if (!node->analyzed) - { - gcc_assert (!node->aux); - node->reachable = false; - } - else if ((!cgraph_can_remove_if_no_direct_calls_and_refs_p (node) - /* Keep around virtual functions for possible devirtualization. */ - || (!before_inlining_p - && !node->global.inlined_to - && DECL_VIRTUAL_P (node->decl) - && (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl)))) - && ((!DECL_EXTERNAL (node->decl)) - || before_inlining_p)) + if ((!cgraph_can_remove_if_no_direct_calls_and_refs_p (node) + /* Keep around virtual functions for possible devirtualization. */ + || (!before_inlining_p + && !node->global.inlined_to + && DECL_VIRTUAL_P (node->decl) + && (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl)))) + && ((!DECL_EXTERNAL (node->decl)) + || before_inlining_p)) { gcc_assert (!node->global.inlined_to); enqueue_cgraph_node (node, &first);