File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
regression/cbmc/constant_folding3 Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change
1
+ int main (void )
2
+ {
3
+ int x ;
4
+ int plus_one_is_null = & x + 1 == (int * )0 ? 1 : 0 ;
5
+ __CPROVER_assert (plus_one_is_null != 2 , "cannot be 2" );
6
+
7
+ return 0 ;
8
+ }
Original file line number Diff line number Diff line change
1
+ CORE new-smt-backend
2
+ main.c
3
+
4
+ ^Generated 1 VCC\(s\), 0 remaining after simplification$
5
+ ^VERIFICATION SUCCESSFUL$
6
+ ^EXIT=0$
7
+ ^SIGNAL=0$
8
+ --
9
+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -239,8 +239,12 @@ bool is_constantt::is_constant(const exprt &expr) const
239
239
expr.id () == ID_typecast || expr.id () == ID_array_of ||
240
240
expr.id () == ID_plus || expr.id () == ID_mult || expr.id () == ID_array ||
241
241
expr.id () == ID_with || expr.id () == ID_struct || expr.id () == ID_union ||
242
- expr.id () == ID_empty_union ||
243
- expr.id () == ID_byte_update_big_endian ||
242
+ expr.id () == ID_empty_union || expr.id () == ID_equal ||
243
+ expr.id () == ID_notequal || expr.id () == ID_lt || expr.id () == ID_le ||
244
+ expr.id () == ID_gt || expr.id () == ID_ge || expr.id () == ID_if ||
245
+ expr.id () == ID_not || expr.id () == ID_and || expr.id () == ID_or ||
246
+ expr.id () == ID_bitnot || expr.id () == ID_bitand || expr.id () == ID_bitor ||
247
+ expr.id () == ID_bitxor || expr.id () == ID_byte_update_big_endian ||
244
248
expr.id () == ID_byte_update_little_endian)
245
249
{
246
250
return std::all_of (
You can’t perform that action at this time.
0 commit comments