2017-03-03 Richard Biener <rguenther@suse.de>
PR middle-end/79818
* match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
TYPE_OVERFLOW_UNDEFINED check.
* gcc.dg/torture/pr79818.c: New testcase.
From-SVN: r245860
+2017-03-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/79818
+ * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
+ TYPE_OVERFLOW_UNDEFINED check.
+
2017-03-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
&& !TYPE_OVERFLOW_TRAPS (TREE_TYPE (@0))
&& !TYPE_SATURATING (TREE_TYPE (@0)))
(with { tree res = int_const_binop (rop, @2, @1); }
- (if (TREE_OVERFLOW (res))
+ (if (TREE_OVERFLOW (res)
+ && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@0)))
{ constant_boolean_node (cmp == NE_EXPR, type); }
(if (single_use (@3))
(cmp @0 { res; }))))))))
+2017-03-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/79818
+ * gcc.dg/torture/pr79818.c: New testcase.
+
2017-03-02 Jakub Jelinek <jakub@redhat.com>
PR c++/79782
--- /dev/null
+/* { dg-do run } */
+/* { dg-additional-options "-fwrapv" } */
+
+static void __attribute__((noinline,noclone))
+func(void)
+{
+ signed char c = 0;
+
+ for(; c >= 0; c++);
+
+ if(c != -128)
+ __builtin_abort();
+}
+
+int main(int argc, char* argv[])
+{
+ func();
+ return 0;
+}