]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR107170] Avoid copying incompatible types in legacy VRP.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 6 Oct 2022 17:11:08 +0000 (19:11 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 6 Oct 2022 20:40:50 +0000 (22:40 +0200)
commit49b9a8c8cc498b1ed2f566bee858e651e14ba37b
treeba30488673d752d265d0924ff18e6ffd79818a3c
parent629b4813e91aba0a8fc9b18434ec1808776a4b3d
[PR107170] Avoid copying incompatible types in legacy VRP.

Legacy VRP is calling ranger deep inside the bowels, and then trying to
copy an incompatible type.  My previous patch in this area assumed that
the only possibility out of vr_values::get_value_range for an
unsupported type was VARYING, but UNDEFINED can also be returned.

PR tree-optimization/107170

gcc/ChangeLog:

* vr-values.cc (vr_values::range_of_expr):  Do not die on
unsupported types.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr107170.c: New test.
gcc/testsuite/gcc.dg/tree-ssa/pr107170.c [new file with mode: 0644]
gcc/vr-values.cc