diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-08-26 16:58:58 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-26 18:12:37 +0200 |
commit | 1e2462890ac748a5e5b6a34fdeb61e7027863a90 (patch) | |
tree | 8540bf7cdad0937fb7e8edfe86d75b962d9aa2a2 /gcc | |
parent | d085901e0e3b3d490fb756b3e939750e7ea2b7fc (diff) | |
download | gcc-1e2462890ac748a5e5b6a34fdeb61e7027863a90.zip gcc-1e2462890ac748a5e5b6a34fdeb61e7027863a90.tar.gz gcc-1e2462890ac748a5e5b6a34fdeb61e7027863a90.tar.bz2 |
Make all default vrange setters set VARYING.
frange is using some of the default vrange setters, some of which are
leaving the range in an undefined state. We hadn't noticed this
because neither frange nor unsupported_range, both which use some of
the default implementation, weren't being used much.
We can never go wrong with setting VARYING ;-).
gcc/ChangeLog:
* value-range.cc (vrange::set): Set varying.
(vrange::set_nonzero): Same.
(vrange::set_zero): Same.
(vrange::set_nonnegative): Same.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/value-range.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index d056f73..edd10bf 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -94,8 +94,9 @@ vrange::singleton_p (tree *) const } void -vrange::set (tree, tree, value_range_kind) +vrange::set (tree min, tree, value_range_kind) { + set_varying (TREE_TYPE (min)); } tree @@ -168,18 +169,21 @@ vrange::nonzero_p () const } void -vrange::set_nonzero (tree) +vrange::set_nonzero (tree type) { + set_varying (type); } void -vrange::set_zero (tree) +vrange::set_zero (tree type) { + set_varying (type); } void -vrange::set_nonnegative (tree) +vrange::set_nonnegative (tree type) { + set_varying (type); } bool |