From c58d50469989799d0f1cc9baff54cc61802b53ed Mon Sep 17 00:00:00 2001
From: Aldy Hernandez <aldyh@redhat.com>
Date: Mon, 4 Nov 2019 19:52:15 +0000
Subject: [PATCH] Handle VR_UNDEFINED in
 value_range_base::normalize_addresses().

From-SVN: r277791
---
 gcc/ChangeLog  | 5 +++++
 gcc/tree-vrp.c | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd1b042a4701..d45d4fc786d5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 7c35802dacc1..c0c1e87a2590 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -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;
 
-- 
GitLab