get_tree_range should check the supplied range type.

get_tree_range currently checks whether value_range supports the
requested type which is incorrect.  It should check whether the supplied
vrange supports the type.

	* value-query.cc (range_query::get_tree_range): Check if return
	range R supports the expression type.
This commit is contained in:
Andrew MacLeod
2026-02-03 11:37:57 -05:00
parent efb0fdf9f1
commit ce08892ee9

View File

@@ -336,7 +336,7 @@ range_query::get_tree_range (vrange &r, tree expr, gimple *stmt,
else
type = TREE_TYPE (expr);
if (!value_range::supports_type_p (type))
if (!r.supports_type_p (type))
{
r.set_undefined ();
return false;