From dbaa912cc8f340546b006071be3a72bf948aed55 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 24 Mar 2011 14:39:36 +0000 Subject: [PATCH] re PR middle-end/48270 (New test failures) 2011-03-24 Richard Guenther PR tree-optimization/48270 * tree-ssa-phiopt.c (cond_if_else_store_replacement): Do not free datarefs before ddrs. From-SVN: r171394 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-phiopt.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c2e1bf4f12f..edf923cbea6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-24 Richard Guenther + + PR tree-optimization/48270 + * tree-ssa-phiopt.c (cond_if_else_store_replacement): Do + not free datarefs before ddrs. + 2011-03-24 Eric Botcazou * tree-sra.c (build_ref_for_offset): Strip useless type conversions diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 77ce5b02f7b..caea9ac723f 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1494,8 +1494,6 @@ cond_if_else_store_replacement (basic_block then_bb, basic_block else_bb, else_ddrs = VEC_alloc (ddr_p, heap, 1); compute_all_dependences (then_datarefs, &then_ddrs, NULL, false); compute_all_dependences (else_datarefs, &else_ddrs, NULL, false); - free_data_refs (then_datarefs); - free_data_refs (else_datarefs); blocks[0] = then_bb; blocks[1] = else_bb; blocks[2] = join_bb; @@ -1517,6 +1515,8 @@ cond_if_else_store_replacement (basic_block then_bb, basic_block else_bb, { free_dependence_relations (then_ddrs); free_dependence_relations (else_ddrs); + free_data_refs (then_datarefs); + free_data_refs (else_datarefs); VEC_free (gimple, heap, then_stores); VEC_free (gimple, heap, else_stores); return false; @@ -1539,6 +1539,8 @@ cond_if_else_store_replacement (basic_block then_bb, basic_block else_bb, { free_dependence_relations (then_ddrs); free_dependence_relations (else_ddrs); + free_data_refs (then_datarefs); + free_data_refs (else_datarefs); VEC_free (gimple, heap, then_stores); VEC_free (gimple, heap, else_stores); return false; @@ -1556,6 +1558,8 @@ cond_if_else_store_replacement (basic_block then_bb, basic_block else_bb, free_dependence_relations (then_ddrs); free_dependence_relations (else_ddrs); + free_data_refs (then_datarefs); + free_data_refs (else_datarefs); VEC_free (gimple, heap, then_stores); VEC_free (gimple, heap, else_stores); -- 2.30.2