On Fri, Aug 17, 2012 at 09:46:35AM +0200, Richard Guenther wrote: > --- gcc/tree-vect-slp.c (revision 190447) > +++ gcc/tree-vect-slp.c (working copy) > @@ -1858,8 +1862,11 @@ new_bb_vec_info (basic_block bb) > static void > destroy_bb_vec_info (bb_vec_info bb_vinfo) > { > + VEC (slp_instance, heap) *slp_instances; > + slp_instance instance; > basic_block bb; > gimple_stmt_iterator si; > + unsigned i; > > if (!bb_vinfo) > return; > @@ -1879,6 +1886,9 @@ destroy_bb_vec_info (bb_vec_info bb_vinf > free_data_refs (BB_VINFO_DATAREFS (bb_vinfo)); > free_dependence_relations (BB_VINFO_DDRS (bb_vinfo)); > VEC_free (gimple, heap, BB_VINFO_GROUPED_STORES (bb_vinfo)); > + slp_instances = BB_VINFO_SLP_INSTANCES (bb_vinfo); > + FOR_EACH_VEC_ELT (slp_instance, slp_instances, i, instance) > + vect_free_slp_instance (instance); > VEC_free (slp_instance, heap, BB_VINFO_SLP_INSTANCES (bb_vinfo));
In this case you should use slp_instances instead of BB_VINFO_SLP_INSTANCES (bb_vinfo) also in the above VEC_free call. > destroy_cost_data (BB_VINFO_TARGET_COST_DATA (bb_vinfo)); > free (bb_vinfo); Jakub