pp_string (pp, "VARYING");
return;
}
- for (unsigned i = 0; i < r.num_pairs (); ++i)
+ // Handle legacy symbolics.
+ if (!r.constant_p ())
{
- tree lb = wide_int_to_tree (r.type (), r.lower_bound (i));
- tree ub = wide_int_to_tree (r.type (), r.upper_bound (i));
+ if (r.kind () == VR_ANTI_RANGE)
+ pp_character (pp, '~');
pp_character (pp, '[');
- print_irange_bound (lb);
+ dump_generic_node (pp, r.min (), 0, TDF_NONE, false);
pp_string (pp, ", ");
- print_irange_bound (ub);
+ dump_generic_node (pp, r.max (), 0, TDF_NONE, false);
+ pp_character (pp, ']');
+ print_irange_bitmasks (r);
+ return;
+ }
+ for (unsigned i = 0; i < r.num_pairs (); ++i)
+ {
+ pp_character (pp, '[');
+ print_irange_bound (r.lower_bound (i), r.type ());
+ pp_string (pp, ", ");
+ print_irange_bound (r.upper_bound (i), r.type ());
pp_character (pp, ']');
}
print_irange_bitmasks (r);
}
void
-vrange_printer::print_irange_bound (tree bound) const
+vrange_printer::print_irange_bound (const wide_int &bound, tree type) const
{
- tree type = TREE_TYPE (bound);
wide_int type_min = wi::min_value (TYPE_PRECISION (type), TYPE_SIGN (type));
wide_int type_max = wi::max_value (TYPE_PRECISION (type), TYPE_SIGN (type));
if (INTEGRAL_TYPE_P (type)
&& !TYPE_UNSIGNED (type)
- && TREE_CODE (bound) == INTEGER_CST
- && wi::to_wide (bound) == type_min
+ && bound == type_min
&& TYPE_PRECISION (type) != 1)
pp_string (pp, "-INF");
- else if (TREE_CODE (bound) == INTEGER_CST
- && wi::to_wide (bound) == type_max
- && TYPE_PRECISION (type) != 1)
+ else if (bound == type_max && TYPE_PRECISION (type) != 1)
pp_string (pp, "+INF");
else
- dump_generic_node (pp, bound, 0, TDF_NONE, false);
+ pp_wide_int (pp, bound, TYPE_SIGN (type));
}
void