Commit de2184c0 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/46286 (ICE in do_complex_constraint, at tree-ssa-structalias.c:1882)

2010-11-03  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/46286
	* tree-ssa-structalias.c (get_constraint_for_1): Avoid referencing
	re-allocated vector data.

From-SVN: r166241
parent 72fdf9e9
2010-11-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46286
* tree-ssa-structalias.c (get_constraint_for_1): Avoid referencing
re-allocated vector data.
2010-11-03 H.J. Lu <hongjiu.lu@intel.com> 2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
PR target/46285 PR target/46285
...@@ -3339,7 +3339,7 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p, ...@@ -3339,7 +3339,7 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p,
{ {
case MEM_REF: case MEM_REF:
{ {
struct constraint_expr *c; struct constraint_expr cs;
varinfo_t vi, curr; varinfo_t vi, curr;
tree off = double_int_to_tree (sizetype, mem_ref_offset (t)); tree off = double_int_to_tree (sizetype, mem_ref_offset (t));
get_constraint_for_ptr_offset (TREE_OPERAND (t, 0), off, results); get_constraint_for_ptr_offset (TREE_OPERAND (t, 0), off, results);
...@@ -3347,12 +3347,12 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p, ...@@ -3347,12 +3347,12 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p,
/* If we are not taking the address then make sure to process /* If we are not taking the address then make sure to process
all subvariables we might access. */ all subvariables we might access. */
c = VEC_last (ce_s, *results); cs = *VEC_last (ce_s, *results);
if (address_p if (address_p
|| c->type != SCALAR) || cs.type != SCALAR)
return; return;
vi = get_varinfo (c->var); vi = get_varinfo (cs.var);
curr = vi->next; curr = vi->next;
if (!vi->is_full_var if (!vi->is_full_var
&& curr) && curr)
...@@ -3366,7 +3366,6 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p, ...@@ -3366,7 +3366,6 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p,
{ {
if (curr->offset - vi->offset < size) if (curr->offset - vi->offset < size)
{ {
struct constraint_expr cs = *c;
cs.var = curr->id; cs.var = curr->id;
VEC_safe_push (ce_s, heap, *results, &cs); VEC_safe_push (ce_s, heap, *results, &cs);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment