From 9bf22b75fcd618405074a24cffe37f9c877e4c36 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 26 Oct 1995 08:29:18 -0400 Subject: [PATCH] (force_to_mode, case ASHIFTRT): Verify mode bitsize is within HOST_BITS_PER_WIDE_INT before shifting by it. From-SVN: r10513 --- gcc/combine.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/combine.c b/gcc/combine.c index 3cdfb32dd3e..a7d6ff4d721 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 -- 2.30.2