+2008-03-27 Andrew Pinski <pinskia@gmail.com>
+
+ PR middle-end/35429
+ * fold-const.c (fold_truthop): Check for integeral types when folding
+ a == 0 && b == 0 and a != 0 || b != 0 .
+
2008-03-26 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF.
if (code == TRUTH_OR_EXPR
&& lcode == NE_EXPR && integer_zerop (lr_arg)
&& rcode == NE_EXPR && integer_zerop (rr_arg)
- && TREE_TYPE (ll_arg) == TREE_TYPE (rl_arg))
+ && TREE_TYPE (ll_arg) == TREE_TYPE (rl_arg)
+ && INTEGRAL_TYPE_P (TREE_TYPE (ll_arg)))
return build2 (NE_EXPR, truth_type,
build2 (BIT_IOR_EXPR, TREE_TYPE (ll_arg),
ll_arg, rl_arg),
if (code == TRUTH_AND_EXPR
&& lcode == EQ_EXPR && integer_zerop (lr_arg)
&& rcode == EQ_EXPR && integer_zerop (rr_arg)
- && TREE_TYPE (ll_arg) == TREE_TYPE (rl_arg))
+ && TREE_TYPE (ll_arg) == TREE_TYPE (rl_arg)
+ && INTEGRAL_TYPE_P (TREE_TYPE (ll_arg)))
return build2 (EQ_EXPR, truth_type,
build2 (BIT_IOR_EXPR, TREE_TYPE (ll_arg),
ll_arg, rl_arg),
+2008-03-27 Andrew Pinski <pinskia@gmail.com>
+
+ PR middle-end/35429
+ * gcc.c-torture/compile/complex-5.c: New test.
+
2008-03-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/uninit-16.c (decode_reloc): Mark static.
--- /dev/null
+int foo(__complex__ int z0, __complex__ int z1)
+{
+ return z0 != 0 || z1 != 0;
+}
+
+int foo1(__complex__ int z0, __complex__ int z1)
+{
+ return z0 == 0 && z1 == 0;
+}