diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-09-14 14:48:36 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-09-14 14:48:36 +0200 |
commit | 12a8d5e2f2e7d7535115e4e105c0f9eb4d50fdad (patch) | |
tree | 627d992b72f512cda6a9ce63a2c44963d56ee101 /gcc/tree-vector-builder.cc | |
parent | 1457be6dbd78e1fd2f84584e020f9a2b3803181a (diff) | |
download | gcc-12a8d5e2f2e7d7535115e4e105c0f9eb4d50fdad.zip gcc-12a8d5e2f2e7d7535115e4e105c0f9eb4d50fdad.tar.gz gcc-12a8d5e2f2e7d7535115e4e105c0f9eb4d50fdad.tar.bz2 |
[PR106936] Remove assert from get_value_range.
This assert was put here to make sure that the legacy
get_value_range() wasn't being called on stuff that legacy couldn't
handle (floats, etc), because the result would ultimately be copied
into a value_range_equiv.
In this case, simplify_casted_cond() is calling it on an offset_type
which is neither an integer nor a pointer. However, range_of_expr
happily punted on it, and then the fallthru code set the range to
VARYING. As value_range_equiv can store VARYING types of anything
(including types it can't handle), this is fine.
The easiest thing to do is remove the assert. If someone from the non
legacy world tries to get a non integer/pointer range here, it's going
to blow up anyhow because the temporary in get_value_range is
int_range_max.
PR tree-optimization/106936
gcc/ChangeLog:
* value-query.cc (range_query::get_value_range): Remove assert.
gcc/testsuite/ChangeLog:
* g++.dg/tree-ssa/pr106936.C: New test.
Diffstat (limited to 'gcc/tree-vector-builder.cc')
0 files changed, 0 insertions, 0 deletions