(simplify_unary_operation): Cast constant 1 to HOST_WIDE_INT
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 29 Dec 1994 19:17:28 +0000 (11:17 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 29 Dec 1994 19:17:28 +0000 (11:17 -0800)
before shifting left to form mask.

From-SVN: r8707

gcc/cse.c

index 487cc3f33c3ec627463d2c20bc356edcb0b0366d..afb464c6981ce2b31f4c3306e44885100a6a5568 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3078,7 +3078,7 @@ simplify_unary_operation (code, mode, op, op_mode)
       if (width < HOST_BITS_PER_WIDE_INT
          && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
              != ((HOST_WIDE_INT) (-1) << (width - 1))))
-       val &= (1 << width) - 1;
+       val &= ((HOST_WIDE_INT) 1 << width) - 1;
 
       return GEN_INT (val);
     }