This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix ICE in ipa-prop at DLV LTO/WHOPR biuld
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, dnovillo at google dot com, rguenther at suse dot de
- Date: Tue, 20 Apr 2010 22:50:20 +0200
- Subject: Fix ICE in ipa-prop at DLV LTO/WHOPR biuld
Hi,
this patch avoids ICE buiding DLV with -fwhopr. When removing unreachable nodes
after whole-program pass, we hit nodes that have no summaries (because they have
no bodies). Fixed thus.
Bootstrapped/regtested x86_64-linux.
* ipa-prop.c (ipa_edge_removal_hook): Check for bounds.
Index: ipa-prop.c
===================================================================
--- ipa-prop.c (revision 158563)
+++ ipa-prop.c (working copy)
@@ -1260,6 +1260,10 @@ ipa_edge_removal_hook (struct cgraph_edg
static void
ipa_node_removal_hook (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
{
+ /* During IPA-CP updating we can be called on not-yet analyze clones. */
+ if (VEC_length (ipa_node_params_t, ipa_node_params_vector)
+ <= (unsigned)node->uid)
+ return;
ipa_free_node_params_substructures (IPA_NODE_REF (node));
}