We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 79c1637 + 871d3a5 commit 80186e3Copy full SHA for 80186e3
regression/cbmc/mm_io1/main.c
@@ -16,6 +16,7 @@ int main()
16
{
17
long i=0x10;
18
char *p=(char *)i;
19
+ unsigned char u = *(unsigned char *)i;
20
char some_var=100;
21
22
char z;
src/goto-programs/mm_io.cpp
@@ -62,7 +62,10 @@ void mm_io(
62
source_locationt source_location = it->source_location();
63
const code_typet &ct=to_code_type(mm_io_r.type());
64
65
- if_exprt if_expr(integer_address(d.pointer()), mm_io_r_value, d);
+ if_exprt if_expr(
66
+ integer_address(d.pointer()),
67
+ typecast_exprt::conditional_cast(mm_io_r_value, d.type()),
68
+ d);
69
replace_expr(d, if_expr, a_rhs);
70
71
const typet &pt=ct.parameters()[0].type();
0 commit comments