From 86e3c991420ec88b9b00604bcf83c1e70d4c64a8 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 25 Jan 2011 09:48:07 +0000 Subject: [PATCH] re PR tree-optimization/47411 (Bootstrap failure on x86-64/Darwin) 2011-01-25 Richard Guenther PR tree-optimization/47411 Backport from mainline 2010-06-30 Michael Matz PR bootstrap/44699 * tree-vrp.c (vrp_finalize): Deal with changing num_ssa_names. From-SVN: r169222 --- gcc/ChangeLog | 9 +++++++++ gcc/tree-vrp.c | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 45586f4ddea9..daba315259dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-01-25 Richard Guenther + + PR tree-optimization/47411 + Backport from mainline + 2010-06-30 Michael Matz + + PR bootstrap/44699 + * tree-vrp.c (vrp_finalize): Deal with changing num_ssa_names. + 2011-01-21 Ramana Radhakrishnan Backport from mainline. diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 5331bc301ea7..bc7ac2f57659 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -7290,6 +7290,7 @@ vrp_finalize (void) size_t i; prop_value_t *single_val_range; bool do_value_subst_p; + unsigned num = num_ssa_names; if (dump_file) { @@ -7301,10 +7302,10 @@ vrp_finalize (void) /* We may have ended with ranges that have exactly one value. Those values can be substituted as any other const propagated value using substitute_and_fold. */ - single_val_range = XCNEWVEC (prop_value_t, num_ssa_names); + single_val_range = XCNEWVEC (prop_value_t, num); do_value_subst_p = false; - for (i = 0; i < num_ssa_names; i++) + for (i = 0; i < num; i++) if (vr_value[i] && vr_value[i]->type == VR_RANGE && vr_value[i]->min == vr_value[i]->max @@ -7332,7 +7333,7 @@ vrp_finalize (void) identify_jump_threads (); /* Free allocated memory. */ - for (i = 0; i < num_ssa_names; i++) + for (i = 0; i < num; i++) if (vr_value[i]) { BITMAP_FREE (vr_value[i]->equiv); -- 2.47.2