+2016-05-19 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/71031
+ * tree-vrp.c (extract_range_from_binary_expr_1): Turn assert into a
+ condition and adjust the code a bit.
+
2016-05-19 Martin Liska <mliska@suse.cz>
* tree-vect-stmts.c (vectorizable_simd_clone_call): Utilize
+2016-05-19 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/71031
+ * gcc.dg/tree-ssa/vrp100.c: New test.
+
2016-05-19 Ilya Enkovich <ilya.enkovich@intel.com>
PR rtl-optimization/71148
--- /dev/null
+/* PR tree-optimization/71031 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+int zj;
+int **yr;
+
+void
+nn (void)
+{
+ unsigned int od = 4;
+
+ for (;;)
+ {
+ int lk;
+
+ for (lk = 0; lk < 2; ++lk)
+ {
+ static int cm;
+
+ zj = 0;
+ if (od == 0)
+ return;
+ ++od;
+ for (cm = 0; cm < 2; ++cm)
+ {
+ --od;
+ **yr = 0;
+ }
+ }
+ }
+}
min = wide_int_to_tree (expr_type, tmin);
max = wide_int_to_tree (expr_type, tmax);
}
- else if (min_ovf == -1 && max_ovf == 1)
- {
- /* Underflow and overflow, drop to VR_VARYING. */
- set_value_range_to_varying (vr);
- return;
- }
- else
+ else if ((min_ovf == -1 && max_ovf == 0)
+ || (max_ovf == 1 && min_ovf == 0))
{
/* Min underflow or max overflow. The range kind
changes to VR_ANTI_RANGE. */
bool covers = false;
wide_int tem = tmin;
- gcc_assert ((min_ovf == -1 && max_ovf == 0)
- || (max_ovf == 1 && min_ovf == 0));
type = VR_ANTI_RANGE;
tmin = tmax + 1;
if (wi::cmp (tmin, tmax, sgn) < 0)
min = wide_int_to_tree (expr_type, tmin);
max = wide_int_to_tree (expr_type, tmax);
}
+ else
+ {
+ /* Other underflow and/or overflow, drop to VR_VARYING. */
+ set_value_range_to_varying (vr);
+ return;
+ }
}
else
{