]> git.ipfire.org Git - thirdparty/gcc.git/commit
Force a [NAN, NAN] range when the definite NAN property is set.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 30 Aug 2022 10:13:31 +0000 (12:13 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 30 Aug 2022 12:26:38 +0000 (14:26 +0200)
commit7e3f18439904bf26eabc658caf843b297a052eb4
treeb94a6c3f5c713df4290cd61e6636af5b89a678f0
parent865d7352b6e73c1f2135561b0a18398b7e7df152
Force a [NAN, NAN] range when the definite NAN property is set.

Setting the definite NAN property should also force a [NAN, NAN]
range, otherwise we'd have two ways of representing a NAN: with the
endpoints or with the property.  In the ranger world we avoid at all
costs having more than one representation for a range.

In doing this, I removed the FRANGE_PROP_ACCESSOR macro, since it
looks like setting a property may have repercurssions in the range
itself, so it's best for the client to definte its own setter.

gcc/ChangeLog:

* value-range-storage.cc (frange_storage_slot::get_frange): Use
frange_nan.
* value-range.cc (frange::set_nan): New.
(frange_nan): Move to header file.
(range_tests_nan): Adjust frange_nan callers to pass type.
New test.
* value-range.h (FRANGE_PROP_ACCESSOR): Remove.
(frange_nan): New.
gcc/value-range-storage.cc
gcc/value-range.cc
gcc/value-range.h