tree-vrp (extract_range_from_binary_expr_1): Treat all divisions by zero as VR_UNDEFINED.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 11 Sep 2018 10:19:45 +0000 (10:19 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Tue, 11 Sep 2018 10:19:45 +0000 (10:19 +0000)
* tree-vrp (extract_range_from_binary_expr_1): Treat all divisions
by zero as VR_UNDEFINED.

From-SVN: r264203

gcc/ChangeLog
gcc/tree-vrp.c

index 80991766b652925aa9d82791a1151253f31bec6a..608c6204fe175e6b757c0e1c44a48f16ea1feffe 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
+
+       * tree-vrp (extract_range_from_binary_expr_1): Treat all divisions
+       by zero as VR_UNDEFINED.
+
 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
index 8f16713300c8db25732b430ca1c968fc03c95ed9..a82cf3e36c1373959f3efbbbcf6e3a17dcb43e7d 100644 (file)
@@ -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;
        }