Fix return value in ranger_cache::get_global_range.

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.
This commit is contained in:
Andrew MacLeod 2022-03-18 11:50:33 -04:00
parent b0ad41c610
commit 98e475a8f5

View 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 the existing value was not current, mark it as always current.
if (!current_p) if (!current_p)
m_temporal->set_always_current (name); 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. // Set the global range of NAME to R and give it a timestamp.