This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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));
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]