[committed] value_range::may_contain_p: Do not access extremes directly

Message ID 48122379-2c12-d21f-c2dd-a8e5fbcf949b@redhat.com
State New
Headers show
Series
  • [committed] value_range::may_contain_p: Do not access extremes directly
Related show

Commit Message

Aldy Hernandez Nov. 8, 2018, 12:28 p.m.
This is an obvious patch I will commit once testing completes.

Aldy

Patch

            * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.

diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 17b0b6c6037..7af676a416d 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -250,10 +250,10 @@  value_range::may_contain_p (tree val) const
 
   if (m_kind == VR_ANTI_RANGE)
     {
-      int res = value_inside_range (val, m_min, m_max);
+      int res = value_inside_range (val, min (), max ());
       return res == 0 || res == -2;
     }
-  return value_inside_range (val, m_min, m_max) != 0;
+  return value_inside_range (val, min (), max ()) != 0;
 }
 
 void