]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid loading an undefined value in the ranger_cache constructor.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 16 Jun 2021 17:01:21 +0000 (13:01 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Wed, 16 Jun 2021 17:01:21 +0000 (13:01 -0400)
Enable_new_values takes a boolean, returning the old value.  The constructor
for ranger_cache initialized the m_new_value_p field by calling this routine
and ignorng the result.  This potentially loads the old value uninitialized.

* gimple-range-cache.cc (ranger_cache::ranger_cache): Initialize
m_new_value_p directly.

gcc/gimple-range-cache.cc

index d9a57c294df25ea61fd63a8734ae429f9eb4ceba..37e2acb19f9d1b190d4e5277d5b4b5de9fde380a 100644 (file)
@@ -727,7 +727,7 @@ ranger_cache::ranger_cache (gimple_ranger &q) : query (q)
       if (bb)
        m_gori.exports (bb);
     }
-  enable_new_values (true);
+  m_new_value_p = true;
 }
 
 ranger_cache::~ranger_cache ()