diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-18 22:20:31 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-18 22:20:31 +0000 |
commit | 452ffe2d7573fb7a5fa3947d0acef6e4161f2778 (patch) | |
tree | e745e65511f8d0afe36387f1e609e401ff896981 /gcc/tree-ssa-structalias.c | |
parent | 069b07bf95a4a461cf593044cdae7ba1fbdfb984 (diff) | |
download | gcc-452ffe2d7573fb7a5fa3947d0acef6e4161f2778.tar.gz |
2005-12-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/25481
* tree-ssa-structalias.c (handle_ptr_arith): Handle
accesses we don't have a varinfo for.
* gcc.dg/torture/pr25481.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108763 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index cf307593b3c..b4251d6f1e3 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3184,9 +3184,13 @@ handle_ptr_arith (VEC (ce_s, heap) *lhsc, tree expr) if (c2->type == ADDRESSOF && rhsoffset != 0) { varinfo_t temp = get_varinfo (c2->var); - - gcc_assert (first_vi_for_offset (temp, rhsoffset) != NULL); - c2->var = first_vi_for_offset (temp, rhsoffset)->id; + + /* An access one after the end of an array is valid, + so simply punt on accesses we cannot resolve. */ + temp = first_vi_for_offset (temp, rhsoffset); + if (temp == NULL) + continue; + c2->var = temp->id; c2->offset = 0; } else |