From: Richard Biener Date: Tue, 11 Mar 2014 15:32:27 +0000 (+0000) Subject: tree-ssa-structalias.c (get_constraint_for_ptr_offset): Add asserts to guard possible... X-Git-Tag: releases/gcc-4.9.0~499 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfd7d2d68b96580180f6d482ffd381913de83ee4;p=thirdparty%2Fgcc.git tree-ssa-structalias.c (get_constraint_for_ptr_offset): Add asserts to guard possible wrong-code bugs. 2014-03-11 Richard Biener * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Add asserts to guard possible wrong-code bugs. From-SVN: r208485 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a38241587b63..92df4717c35e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-03-11 Richard Biener + + * tree-ssa-structalias.c (get_constraint_for_ptr_offset): + Add asserts to guard possible wrong-code bugs. + 2014-03-11 Richard Biener PR tree-optimization/60429 diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index e1e1147e9935..8201cb423c1d 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -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; }