OSDN Git Service

* ipa-prop.c (ipa_edge_removal_hook): Check for bounds.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Apr 2010 14:41:50 +0000 (14:41 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 01:08:18 +0000 (10:08 +0900)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158610 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-prop.c

index 13ac239..277e348 100644 (file)
@@ -1,5 +1,9 @@
 2010-04-21  Jan Hubicka  <jh@suse.cz>
 
+       * ipa-prop.c (ipa_edge_removal_hook): Check for bounds.
+
+2010-04-21  Jan Hubicka  <jh@suse.cz>
+
        * varpool.c (decide_is_variable_needed): Variable is always needed
        during ltrans.
 
index ec9f63d..af00175 100644 (file)
@@ -1260,6 +1260,10 @@ ipa_edge_removal_hook (struct cgraph_edge *cs, void *data ATTRIBUTE_UNUSED)
 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));
 }