2016-04-21 Richard Biener <rguenther@suse.de>
PR middle-end/70747
* fold-const.c (fold_comparison): Return properly typed
constant boolean.
* gcc.dg/pr70747.c: New testcase.
From-SVN: r235335
+2016-04-21 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/70747
+ * fold-const.c (fold_comparison): Return properly typed
+ constant boolean.
+
2016-04-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/70715
case EQ_EXPR:
case LE_EXPR:
case LT_EXPR:
- return boolean_false_node;
+ return constant_boolean_node (false, type);
case GE_EXPR:
case GT_EXPR:
case NE_EXPR:
- return boolean_true_node;
+ return constant_boolean_node (true, type);
default:
gcc_unreachable ();
}
+2016-04-21 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/70747
+ * gcc.dg/pr70747.c: New testcase.
+
2016-04-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/70715
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-pedantic" } */
+
+int *a, b;
+
+void fn1 ()
+{
+ a = __builtin_malloc (sizeof(int)*2);
+ b = &a[1] == (0, 0); /* { dg-warning "comparison between pointer and integer" } */
+}