+2008-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/37931
+ * fold-const.c (distribute_bit_expr): Convert common, left and
+ right arguments to type.
+
2008-10-28 Nick Clifton <nickc@redhat.com>
* config/mn10300/mn10300.h (CALL_REALLY_USED_REGISTERS): Define.
else
return 0;
+ common = fold_convert (type, common);
+ left = fold_convert (type, left);
+ right = fold_convert (type, right);
return fold_build2 (TREE_CODE (arg0), type, common,
fold_build2 (code, type, left, right));
}
+2008-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/37931
+ * gcc.c-torture/execute/pr37931.c: New test.
+
2008-10-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/37879
--- /dev/null
+/* PR middle-end/37931 */
+
+extern void abort (void);
+
+int
+foo (int a, unsigned int b)
+{
+ return (a | 1) & (b | 1);
+}
+
+int
+main (void)
+{
+ if (foo (6, 0xc6) != 7)
+ abort ();
+ if (foo (0x80, 0xc1) != 0x81)
+ abort ();
+ if (foo (4, 4) != 5)
+ abort ();
+ if (foo (5, 4) != 5)
+ abort ();
+ return 0;
+}