2016-09-15 Richard Biener <rguenther@suse.de>
PR middle-end/77544
* fold-const.c (split_tree): Do not split constant ~X.
* c-c++-common/torture/pr77544.c: New testcase.
From-SVN: r240164
+2016-09-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/77544
+ * fold-const.c (split_tree): Do not split constant ~X.
+
2016-09-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/77425
var = negate_expr (var);
}
}
+ else if (TREE_CONSTANT (in))
+ *conp = in;
else if (TREE_CODE (in) == BIT_NOT_EXPR
&& code == PLUS_EXPR)
{
- /* -X - 1 is folded to ~X, undo that here. */
+ /* -X - 1 is folded to ~X, undo that here. Do _not_ do this
+ when IN is constant. */
*minus_litp = build_one_cst (TREE_TYPE (in));
var = negate_expr (TREE_OPERAND (in, 0));
}
- else if (TREE_CONSTANT (in))
- *conp = in;
else
var = in;
+2016-09-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/77544
+ * c-c++-common/torture/pr77544.c: New testcase.
+
2016-09-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/77475
--- /dev/null
+/* { dg-do compile } */
+
+struct {
+ long a : 17;
+} b;
+int c, d;
+void e() { b.a = d + c + ~(long)(302806U >> 0); }