File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1676,7 +1676,11 @@ exprt simplify_exprt::bits2expr(
1676
1676
return constant_exprt (tmp, type);
1677
1677
}
1678
1678
else if (type.id ()==ID_c_enum)
1679
- return constant_exprt (bits, type);
1679
+ {
1680
+ exprt val=bits2expr (bits, type.subtype (), little_endian);
1681
+ val.type ()=type;
1682
+ return val;
1683
+ }
1680
1684
else if (type.id ()==ID_c_enum_tag)
1681
1685
return
1682
1686
bits2expr (
@@ -1925,10 +1929,8 @@ bool simplify_exprt::simplify_byte_extract(byte_extract_exprt &expr)
1925
1929
1926
1930
// no proper simplification for expr.type()==void
1927
1931
// or types of unknown size
1928
- if (expr.type ().id ()==ID_empty ||
1929
- el_size<0 )
1932
+ if (el_size<=0 )
1930
1933
return true ;
1931
- assert (el_size>0 );
1932
1934
1933
1935
if (expr.op ().id ()==ID_array_of &&
1934
1936
expr.op ().op0 ().id ()==ID_constant)
You can’t perform that action at this time.
0 commit comments