simplifications of (eq/ne (xor x y) y) and
(eq/ne (xor x y) x).
+ PR tree-optimization/26622.
+ * fold-const.c (fold_ternary) <COND_EXPR>: Call fold_convert
+ on arg1.
+
2006-05-21 Bernhard Fischer <aldot@gcc.gnu.org>
* tree-cfg.c: Prune whitespace.
&& integer_zerop (TREE_OPERAND (arg0, 1))
&& integer_zerop (op2)
&& (tem = sign_bit_p (TREE_OPERAND (arg0, 0), arg1)))
- return fold_convert (type, fold_build2 (BIT_AND_EXPR,
- TREE_TYPE (tem), tem, arg1));
+ return fold_convert (type,
+ fold_build2 (BIT_AND_EXPR,
+ TREE_TYPE (tem), tem,
+ fold_convert (TREE_TYPE (tem), arg1)));
/* (A >> N) & 1 ? (1 << N) : 0 is simply A & (1 << N). A & 1 was
already handled above. */
* gcc.c-torture/execute/pr27671-1.c: New.
* gcc.dg/pr27671-2.c: Likewise.
+ PR tree-optimization/26622.
+ * gcc.c-torture/compile/pr26622.c: New.
+
2006-05-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27613
--- /dev/null
+/* PR middle-end/26622
+ fold_ternary used to create a tree with mismatching types, causing
+ (const_int 128) to appear in QImode rtx. */
+
+unsigned char g;
+
+unsigned long long
+foo (void)
+{
+ return ((long long) ((g & 0x80) != 0)) << 7;
+}