http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49533
--- Comment #8 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-07-13 21:13:31 UTC --- Hmm, that whole approach doesn't seem to work. The following patch survives building of stellarium and explains the failures that I've reported above: diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index c329bea..bef1d38 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -122,7 +122,10 @@ can_remove_node_now_p (struct cgraph_node *node, struct cgraph_edge *e) next != node; next = next->same_comdat_group) if (node->callers && node->callers != e && !can_remove_node_now_p_1 (node)) - return false; + { + gcc_unreachable(); + return false; + } return true; } Even when one changes node to next in the if clause, "next->callers == e" is always true and the following patch also survives building of stellarium. But it merely brings us back to the status quo before commit 7791b0eb56c3c went in... diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index c329bea..2a09de8 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -120,9 +120,13 @@ can_remove_node_now_p (struct cgraph_node *node, struct cgraph_edge *e) return true; for (next = node->same_comdat_group; next != node; next = next->same_comdat_group) - if (node->callers && node->callers != e - && !can_remove_node_now_p_1 (node)) - return false; + if (next->callers + && !can_remove_node_now_p_1 (next)) + { + gcc_assert (next->callers == e); + return false; + } + gcc_unreachable(); return true; }