2017-08-17 Richard Biener <rguenther@suse.de>
* tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
to true when overflow is undefined and we saturated the
result.
* gcc.dg/tree-ssa/vrp117.c: New testcase.
From-SVN: r251141
+2017-08-17 Richard Biener <rguenther@suse.de>
+
+ * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
+ to true when overflow is undefined and we saturated the
+ result.
+
2017-08-17 Alan Modra <amodra@gmail.com>
PR target/80938
+2017-08-17 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/vrp117.c: New testcase.
+
2017-08-16 Uros Bizjak <ubizjak@gmail.com>
* c-c++-common/patchable_function_entry-decl.c (dg-final): Adapt
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+
+void link_error (void);
+
+void foo (int i)
+{
+ if (i > __INT_MAX__ - 10)
+ {
+ int j = i * 10;
+ if (j < i)
+ link_error ();
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "link_error" "evrp" } } */
signop sign = TYPE_SIGN (TREE_TYPE (val1));
wide_int res;
+ *overflow_p = false;
+
switch (code)
{
case RSHIFT_EXPR:
gcc_unreachable ();
}
- *overflow_p = overflow;
-
if (overflow
&& TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (val1)))
{
TYPE_SIGN (TREE_TYPE (val1)));
}
+ *overflow_p = overflow;
+
return res;
}