2016-06-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/71521
* tree-vrp.c (extract_range_from_binary_expr_1): Guard
division int_const_binop against zero divisor.
* gcc.dg/tree-ssa/vrp101.c: New testcase.
From-SVN: r237425
+2016-06-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71521
+ * tree-vrp.c (extract_range_from_binary_expr_1): Guard
+ division int_const_binop against zero divisor.
+
2016-06-13 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (signbittf2): New expander.
+2016-06-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71521
+ * tree-vrp.c (extract_range_from_binary_expr_1): Guard
+ division int_const_binop against zero divisor.
+
2016-06-13 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/71498
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int x = 1;
+
+int main ()
+{
+ int t = (1/(1>=x))>>1;
+ if (t != 0) __builtin_abort();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "<bb 2>:\[\n\r \]*return 0;" "optimized" } } */
and divisor are available. */
if (vr1.type == VR_RANGE
&& !symbolic_range_p (&vr0)
- && !symbolic_range_p (&vr1))
+ && !symbolic_range_p (&vr1)
+ && compare_values (vr1.max, zero) != 0)
min = int_const_binop (code, vr0.min, vr1.max);
else
min = zero;