On 5/6/26 10:10, David Malcolm wrote:
This patch adds value_range info where available to the various nodes
in svalue dumps, such as:
(gdb) call rhs2_sval->dump ()
(27): ‘long long unsigned int’: binop_svalue(bit_and_expr: ‘&’) value range:
{[irange] long long unsigned int [0, 0]}
├─ (24): ‘long long unsigned int’: unaryop_svalue(nop_expr) value range:
{[irange] long long unsigned int [0, 4294967295] MASK 0xffffffff VALUE 0x0}
│ ╰─ (22): ‘unsigned int’: initial_svalue value range: {[irange] unsigned int
VARYING}
│ ╰─ m_reg: (21): ‘unsigned int’: decl_region(‘m’)
│ ╰─ parent: (4): globals
│ ╰─ parent: (0): root region
╰─ (26): ‘long long unsigned int’: constant_svalue (‘5497558138880’) value
range: {[irange] long long unsigned int [5497558138880, 5497558138880]}
where we can see that sval 27 has value range [0,0] and
where that comes from (due to being a bit_and_expr of non-overlapping
ranges from sval 24 and 26).
Successfully bootstrapped & regrtested on aarch64-unknown-linux-gnu.
Andrew: are the value-range parts OK for trunk?
OK.
Andrew