]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix return value in ranger_cache::get_global_range.
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 18 Mar 2022 15:50:33 +0000 (11:50 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 13 May 2022 14:39:41 +0000 (10:39 -0400)
The "is_current" status is returned by parameter, but was being returned by the
function as well instead of true if NAME had a global range, and FALSE
if it did not.

* gimple-range-cache.cc (ranger_cache::get_global_range): Return the
had_global value instead.

gcc/gimple-range-cache.cc

index bdb30460345d7520f8ef9131c91789a70abe9bce..d3cf8be9bd89e7653a18358b0e9fae6a00012842 100644 (file)
@@ -951,7 +951,7 @@ ranger_cache::get_global_range (irange &r, tree name, bool &current_p)
   // If the existing value was not current, mark it as always current.
   if (!current_p)
     m_temporal->set_always_current (name);
-  return current_p;
+  return had_global;
 }
 
 //  Set the global range of NAME to R and give it a timestamp.