diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2023-05-16 22:20:54 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2023-05-17 16:08:48 +0200 |
commit | 615e3d1e9306dbf27c5af3bc6ebabb697dcc4297 (patch) | |
tree | 9595674471bbe84caa73c2b5c24aa348a969b717 /gcc/value-range.cc | |
parent | 029bfd4f419a58a47fa27036b900def620a2cd28 (diff) | |
download | gcc-615e3d1e9306dbf27c5af3bc6ebabb697dcc4297.zip gcc-615e3d1e9306dbf27c5af3bc6ebabb697dcc4297.tar.gz gcc-615e3d1e9306dbf27c5af3bc6ebabb697dcc4297.tar.bz2 |
Provide support for copying unsupported ranges.
The unsupported_range class is provided for completness sake. It is a
way to set VARYING/UNDEFINED ranges for unsupported ranges (currently
anything not float, integer, or pointer). You can't do anything with
them, except set_varying, and set_undefined. We will trap on any
other operation.
This patch provides a way to copy them, just in case they creep in.
This could happen in IPA under certain circumstances.
gcc/ChangeLog:
* value-range.cc (vrange::operator=): Add a stub to copy
unsupported ranges.
* value-range.h (is_a <unsupported_range>): New.
(Value_Range::operator=): Support copying unsupported ranges.
Diffstat (limited to 'gcc/value-range.cc')
-rw-r--r-- | gcc/value-range.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 93c44a6..45b1e65 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -203,7 +203,10 @@ vrange::operator= (const vrange &src) else if (is_a <frange> (src)) as_a <frange> (*this) = as_a <frange> (src); else - gcc_unreachable (); + { + gcc_checking_assert (is_a <unsupported_range> (src)); + m_kind = src.m_kind; + } return *this; } |