diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2024-03-19 18:29:21 +0100 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2024-04-28 21:03:01 +0200 |
commit | b102633be7d0b763d106b0a883679bb1497ca17c (patch) | |
tree | f0800edc781d2f70df578c0e8ea4b67d982eeb46 /gcc/value-range.h | |
parent | c284f8d2d16ce9c29defce3329419ccc54605ad4 (diff) | |
download | gcc-b102633be7d0b763d106b0a883679bb1497ca17c.zip gcc-b102633be7d0b763d106b0a883679bb1497ca17c.tar.gz gcc-b102633be7d0b763d106b0a883679bb1497ca17c.tar.bz2 |
Accept any vrange in range_includes_zero_p.
Accept a vrange, as this will be used for either integers or pointers.
gcc/ChangeLog:
* value-range.h (range_includes_zero_p): Accept vrange.
Diffstat (limited to 'gcc/value-range.h')
-rw-r--r-- | gcc/value-range.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h index ede90a4..0ab71769 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -970,7 +970,7 @@ irange::contains_p (tree cst) const } inline bool -range_includes_zero_p (const irange &vr) +range_includes_zero_p (const vrange &vr) { if (vr.undefined_p ()) return false; @@ -978,8 +978,7 @@ range_includes_zero_p (const irange &vr) if (vr.varying_p ()) return true; - wide_int zero = wi::zero (TYPE_PRECISION (vr.type ())); - return vr.contains_p (zero); + return vr.contains_p (build_zero_cst (vr.type ())); } // Constructors for irange |