diff options
Diffstat (limited to 'gcc/gimple-ssa-store-merging.c')
-rw-r--r-- | gcc/gimple-ssa-store-merging.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index e1ddcb5..5e5823c 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -262,7 +262,9 @@ do_shift_rotate (enum tree_code code, int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT; unsigned head_marker; - if (count % BITS_PER_UNIT != 0) + if (count < 0 + || count >= TYPE_PRECISION (n->type) + || count % BITS_PER_UNIT != 0) return false; count = (count / BITS_PER_UNIT) * BITS_PER_MARKER; |