PR c/39779
* c-typeck.c (build_binary_op) <short_shift>: Check that integer
constant is more than zero.
testsuite/ChangeLog:
PR c/39779
* gcc.c-torture/compile/pr39779.c: New test.
From-SVN: r152066
+2009-09-23 Uros Bizjak <ubizjak@gmail.com>
+
+ PR c/39779
+ * c-typeck.c (build_binary_op) <short_shift>: Check that integer
+ constant is more than zero.
+
2009-09-21 Janis Johnson <janis187@us.ibm.com>
PR c/41049
unsigned_arg = TYPE_UNSIGNED (TREE_TYPE (op0));
if (TYPE_PRECISION (TREE_TYPE (arg0)) < TYPE_PRECISION (result_type)
+ && tree_int_cst_sgn (op1) > 0
/* We can shorten only if the shift count is less than the
number of bits in the smaller type size. */
&& compare_tree_int (op1, TYPE_PRECISION (TREE_TYPE (arg0))) < 0
+2009-09-23 Uros Bizjak <ubizjak@gmail.com>
+
+ PR c/39779
+ * gcc.c-torture/compile/pr39779.c: New test.
+
2009-09-21 Janis Johnson <janis187@us.ibm.com>
PR c/41049
--- /dev/null
+int test (char v1)
+{
+ v1 >>= 0xdebecced;
+ return v1;
+}