diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-08-30 15:46:43 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-30 17:43:37 +0200 |
commit | 75f59441cd63a1d07e86d70d59c518049f53904f (patch) | |
tree | 84f0d2e66b02beb667e5bdadaa0a22e5768aba82 /libcpp | |
parent | b73c49f6f88dd7f7569f9a72c8ceb04598d4c15c (diff) | |
download | gcc-75f59441cd63a1d07e86d70d59c518049f53904f.zip gcc-75f59441cd63a1d07e86d70d59c518049f53904f.tar.gz gcc-75f59441cd63a1d07e86d70d59c518049f53904f.tar.bz2 |
Improve union of ranges containing NAN.
Previously [5,6] U NAN would just drop to VARYING. With this patch,
the resulting range becomes [5,6] with the NAN bit set to unknown.
[I still have yet to decide what to do with intersections. ISTM, the
intersection of a known NAN with anything else should be a NAN, but it
could also be undefined (the empty set). I'll have to run some tests
and see. Currently, we drop to VARYING cause well... it's always safe
to give up;-).]
gcc/ChangeLog:
* value-range.cc (early_nan_resolve): Change comment.
(frange::union_): Handle union when one side is a NAN.
(range_tests_nan): Add tests for NAN union.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions