diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2023-05-24 19:55:09 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2023-05-25 07:24:52 +0200 |
commit | fae324f1901aff86be3183d87447eddaf33ec262 (patch) | |
tree | ec2f11cb375397b900e0516eb70b2c59cef61def /gcc/data-streamer-in.cc | |
parent | cd64ba5a7265b5733da6b54cf72b726113dd68d8 (diff) | |
download | gcc-fae324f1901aff86be3183d87447eddaf33ec262.zip gcc-fae324f1901aff86be3183d87447eddaf33ec262.tar.gz gcc-fae324f1901aff86be3183d87447eddaf33ec262.tar.bz2 |
Disallow setting of NANs in frange setter unless setting trees.
frange::set() is confusing in that we can set a NAN by specifying a
bound of +-NAN, even though we tecnically disallow NANs in the setter
because the kind can never be VR_NAN. This is a wart for
get_tree_range(), which builds a range out of a tree from the source,
to work correctly. It's ugly, and it showed its limitation while
implementing LTO streaming of ranges.
This patch disallows passing NAN bounds in frange::set() and fixes
get_tree_range.
gcc/ChangeLog:
* value-query.cc (range_query::get_tree_range): Set NAN directly
if necessary.
* value-range.cc (frange::set): Assert that bounds are not NAN.
Diffstat (limited to 'gcc/data-streamer-in.cc')
0 files changed, 0 insertions, 0 deletions