diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-10-26 08:29:18 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-10-26 08:29:18 -0400 |
commit | 9bf22b75fcd618405074a24cffe37f9c877e4c36 (patch) | |
tree | 948671afd902167dca035b4fd41da2029e0f7cac | |
parent | e82ee4ccb6c344f5525e0c640e9f279d7d1013c0 (diff) | |
download | gcc-9bf22b75fcd618405074a24cffe37f9c877e4c36.zip gcc-9bf22b75fcd618405074a24cffe37f9c877e4c36.tar.gz gcc-9bf22b75fcd618405074a24cffe37f9c877e4c36.tar.bz2 |
(force_to_mode, case ASHIFTRT): Verify mode bitsize is within
HOST_BITS_PER_WIDE_INT before shifting by it.
From-SVN: r10513
-rw-r--r-- | gcc/combine.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 3cdfb32..a7d6ff4 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6018,8 +6018,9 @@ force_to_mode (x, mode, mask, reg, just_select) case ASHIFTRT: /* If we are just looking for the sign bit, we don't need this shift at all, even if it has a variable count. */ - if (mask == ((HOST_WIDE_INT) 1 - << (GET_MODE_BITSIZE (GET_MODE (x)) - 1))) + if (GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT + && (mask == ((HOST_WIDE_INT) 1 + << (GET_MODE_BITSIZE (GET_MODE (x)) - 1)))) return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); /* If this is a shift by a constant, get a mask that contains those bits |