Allow copying of symbolic ranges to an irange.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 15 Sep 2020 15:33:48 +0000 (17:33 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 17 Sep 2020 10:51:54 +0000 (12:51 +0200)
commit80cbca32464ae05931c0ae425eec7d1f373946eb
tree2b70518f772436d94a175d5cc07cfafdd2ebf1c2
parent27eac88a3f23ef7efbbd725504963cffc71dcad4
Allow copying of symbolic ranges to an irange.

This fixes an ICE when trying to copy a legacy value_range containing
a symbolic to a multi-range:

min = make_ssa_name (type);
max = build_int_cst (type, 55);
value_range vv (min, max);
int_range<2> vr = vv;

gcc/ChangeLog:

* range-op.cc (multi_precision_range_tests): Normalize symbolics when copying to a
multi-range.
* value-range.cc (irange::copy_legacy_range): Add test.
gcc/range-op.cc
gcc/value-range.cc