From 075cdac363c06c1524732855eee852965737c5ec Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Tue, 11 Sep 2018 10:19:45 +0000 Subject: [PATCH] tree-vrp (extract_range_from_binary_expr_1): Treat all divisions by zero as VR_UNDEFINED. * tree-vrp (extract_range_from_binary_expr_1): Treat all divisions by zero as VR_UNDEFINED. From-SVN: r264203 --- gcc/ChangeLog | 5 +++++ gcc/tree-vrp.c | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 80991766b65..608c6204fe1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-09-11 Aldy Hernandez + + * tree-vrp (extract_range_from_binary_expr_1): Treat all divisions + by zero as VR_UNDEFINED. + 2018-09-10 Uros Bizjak * config/i386/i386.md (xf2): Rename from *xf2_i387. diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 8f16713300c..a82cf3e36c1 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -1601,12 +1601,7 @@ extract_range_from_binary_expr_1 (value_range *vr, /* Special case explicit division by zero as undefined. */ if (range_is_null (&vr1)) { - /* However, we must not eliminate a division by zero if - flag_non_call_exceptions. */ - if (cfun->can_throw_non_call_exceptions) - set_value_range_to_varying (vr); - else - set_value_range_to_undefined (vr); + set_value_range_to_undefined (vr); return; } -- 2.30.2