File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
regression/cbmc/hex_trace Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,15 @@ int main()
3
3
int a ;
4
4
unsigned int b ;
5
5
float f ;
6
+ char * p ;
6
7
7
8
a = 0 ;
8
9
a = -100 ;
9
10
a = 2147483647 ;
10
11
b = a * 2 ;
11
12
a = -2147483647 ;
12
13
f = 0.1f ;
14
+ p = (char * )123 ;
13
15
14
16
__CPROVER_assert (0 , "" );
15
17
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ a=2147483647 \s*\(0x7FFFFFFF\)
10
10
b=4294967294ul? \s*\(0xFFFFFFFE\)
11
11
a=-2147483647 \s*\(0x80000001\)
12
12
f=0\.1f \s*\(0x3DCCCCCD\)
13
+ p=.* \(0x7B\)
13
14
^VERIFICATION FAILED$
14
15
--
15
16
^warning: ignoring
Original file line number Diff line number Diff line change @@ -242,6 +242,15 @@ std::string trace_numeric_value(
242
242
}
243
243
}
244
244
}
245
+ else if (expr.id () == ID_annotated_pointer_constant)
246
+ {
247
+ const auto &annotated_pointer_constant =
248
+ to_annotated_pointer_constant_expr (expr);
249
+ auto width = to_pointer_type (expr.type ()).get_width ();
250
+ auto &value = annotated_pointer_constant.get_value ();
251
+ auto c = constant_exprt (value, unsignedbv_typet (width));
252
+ return numeric_representation (c, ns, options);
253
+ }
245
254
else if (expr.id ()==ID_array)
246
255
{
247
256
std::string result;
You can’t perform that action at this time.
0 commit comments