We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fd77f4 commit 57855b8Copy full SHA for 57855b8
src/util/simplify_expr.cpp
@@ -1734,12 +1734,15 @@ bool simplify_exprt::simplify_byte_extract(byte_extract_exprt &expr)
1734
return true;
1735
1736
if(expr.op().id()==ID_array_of &&
1737
- expr.op().op0().id()==ID_constant)
+ to_array_of_expr(expr.op()).op().id()==ID_constant)
1738
{
1739
std::string const_bits=
1740
- expr2bits(expr.op().op0(),
+ expr2bits(to_array_of_expr(expr.op()).op(),
1741
byte_extract_id()==ID_byte_extract_little_endian);
1742
1743
+ if(const_bits.empty())
1744
+ return true;
1745
+
1746
// double the string until we have sufficiently many bits
1747
while(mp_integer(const_bits.size())<offset*8+el_size)
1748
const_bits+=const_bits;
0 commit comments