diff options
author | Richard Guenther <rguenther@suse.de> | 2006-01-10 14:55:59 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-01-10 14:55:59 +0000 |
commit | a555a02ce606c46f41433e524e81162af396b11c (patch) | |
tree | a59ae301392868057eb7ebcb20df8d31de9e6a2d /gcc/tree-ssa-structalias.c | |
parent | 56b04af7312e90f6af5e347e0eafc18af2d0aa1e (diff) | |
download | gcc-a555a02ce606c46f41433e524e81162af396b11c.zip gcc-a555a02ce606c46f41433e524e81162af396b11c.tar.gz gcc-a555a02ce606c46f41433e524e81162af396b11c.tar.bz2 |
tree-ssa-structalias.c (get_constraint_for_component_ref): Never override with anything constraint.
2006-01-10 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Never override with anything constraint.
From-SVN: r109544
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 63ba8d4..e7b47fc 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -2373,25 +2373,14 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results) t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize); get_constraint_for (t, results); result = VEC_last (ce_s, *results); + result->offset = bitpos; gcc_assert (beforelength + 1 == VEC_length (ce_s, *results)); /* This can also happen due to weird offsetof type macros. */ if (TREE_CODE (t) != ADDR_EXPR && result->type == ADDRESSOF) result->type = SCALAR; - - /* If we know where this goes, then yay. Otherwise, booo. */ - if (bitmaxsize != -1 - && bitsize == bitmaxsize) - { - result->offset = bitpos; - } - else - { - result->var = anything_id; - result->offset = 0; - } - + if (result->type == SCALAR) { /* In languages like C, you can access one past the end of an @@ -2409,7 +2398,7 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results) for (curr = get_varinfo (result->var); curr; curr = curr->next) { if (offset_overlaps_with_access (curr->offset, curr->size, - result->offset, bitsize)) + result->offset, bitmaxsize)) { result->var = curr->id; break; |