diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f025864ae30..f5f5afb8b83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-09-11 Richard Sandiford + + * combine.c (simplify_shift_const): Treat shifts by the mode + size as undefined. + 2001-09-11 Neil Booth * cpphash.h (struct tokenrun): New. diff --git a/gcc/combine.c b/gcc/combine.c index 78bf6ceb91e..1512ef01a12 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -8825,7 +8825,7 @@ simplify_shift_const (x, code, result_mode, varop, input_count) /* If we were given an invalid count, don't do anything except exactly what was requested. */ - if (input_count < 0 || input_count > (int) GET_MODE_BITSIZE (mode)) + if (input_count < 0 || input_count >= (int) GET_MODE_BITSIZE (mode)) { if (x) return x;