Handle VR_UNDEFINED in value_range_base::normalize_addresses().
authorAldy Hernandez <aldyh@redhat.com>
Mon, 4 Nov 2019 19:52:15 +0000 (19:52 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Mon, 4 Nov 2019 19:52:15 +0000 (19:52 +0000)
From-SVN: r277791

gcc/ChangeLog
gcc/tree-vrp.c

index dd1b042a47018a41308900e94e5f46a3cd3c4a9d..d45d4fc786d556245729220e61f63e7fa061d232 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-04  Aldy Hernandez  <aldyh@redhat.com>
+
+       * tree-vrp.c (value_range_base::normalize_addresses): Handle
+       VR_UNDEFINED.
+
 2019-11-04  Aldy Hernandez  <aldyh@redhat.com>
 
        * tree-vrp.c (dump_assert_info): New.
index 7c35802dacc12713e2d4b35c985d7db302645abe..c0c1e87a25909f3fcbb2a329e72e5e7b97b1b5c1 100644 (file)
@@ -6130,6 +6130,9 @@ value_range::union_ (const value_range *other)
 value_range_base
 value_range_base::normalize_addresses () const
 {
+  if (undefined_p ())
+    return *this;
+
   if (!POINTER_TYPE_P (type ()) || range_has_numeric_bounds_p (this))
     return *this;