Change x mod 0 to produce UNDEFINED rather than VARYING.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 26 Apr 2021 21:46:31 +0000 (17:46 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 7 May 2021 19:00:21 +0000 (15:00 -0400)
* range-op.cc (operator_trunc_mod::wi_fold): x % 0 is UNDEFINED.

gcc/range-op.cc

index 0027b3e..ab8f4e2 100644 (file)
@@ -2689,7 +2689,7 @@ operator_trunc_mod::wi_fold (irange &r, tree type,
   // Mod 0 is undefined.
   if (wi_zero_p (type, rh_lb, rh_ub))
     {
-      r.set_varying (type);
+      r.set_undefined ();
       return;
     }