Commit dfd7d2d6 by Richard Biener Committed by Richard Biener

tree-ssa-structalias.c (get_constraint_for_ptr_offset): Add asserts to guard…

tree-ssa-structalias.c (get_constraint_for_ptr_offset): Add asserts to guard possible wrong-code bugs.

2014-03-11  Richard Biener  <rguenther@suse.de>

	* tree-ssa-structalias.c (get_constraint_for_ptr_offset):
	Add asserts to guard possible wrong-code bugs.

From-SVN: r208485
parent af1ab449
2014-03-11 Richard Biener <rguenther@suse.de>
* tree-ssa-structalias.c (get_constraint_for_ptr_offset):
Add asserts to guard possible wrong-code bugs.
2014-03-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/60429
PR tree-optimization/60485
* tree-ssa-structalias.c (set_union_with_increment): Properly
......
......@@ -3095,7 +3095,7 @@ get_constraint_for_ptr_offset (tree ptr, tree offset,
if (c.type == ADDRESSOF
/* If this varinfo represents a full variable just use it. */
&& curr->is_full_var)
c.offset = 0;
;
else if (c.type == ADDRESSOF
/* If we do not know the offset add all subfields. */
&& rhsoffset == UNKNOWN_OFFSET)
......@@ -3143,8 +3143,14 @@ get_constraint_for_ptr_offset (tree ptr, tree offset,
temp = vi_next (temp);
}
}
else if (c.type == SCALAR)
{
gcc_assert (c.offset == 0);
c.offset = rhsoffset;
}
else
c.offset = rhsoffset;
/* We shouldn't get any DEREFs here. */
gcc_unreachable ();
(*results)[j] = c;
}
......
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