File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
regression/contracts/assigns_enforce_15 Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,16 @@ int baz() __CPROVER_ensures(__CPROVER_return_value == global)
20
20
return global ;
21
21
}
22
22
23
+ void qux (void ) __CPROVER_assigns ()
24
+ {
25
+ global = global + 1 ;
26
+ }
27
+
23
28
int main ()
24
29
{
25
30
int n ;
26
31
n = foo (& n );
27
32
n = baz ();
33
+ qux ();
28
34
return 0 ;
29
35
}
Original file line number Diff line number Diff line change 3
3
--enforce-all-contracts
4
4
^EXIT=10$
5
5
^SIGNAL=0$
6
- ^\[bar.1\] line \d+ .*: FAILURE$
7
- ^\[baz.1\] line \d+ .*: FAILURE$
6
+ ^\[bar\.1\] line \d+ .*: FAILURE$
7
+ ^\[baz\.1\] line \d+ .*: FAILURE$
8
+ ^\[qux\.1\] line \d+ .*: FAILURE$
8
9
^VERIFICATION FAILED$
9
10
--
10
11
--
Original file line number Diff line number Diff line change @@ -3272,6 +3272,12 @@ cprover_contract_assigns_opt:
3272
3272
parser_stack ($3 ).id (ID_target_list);
3273
3273
mto ($$, $3 );
3274
3274
}
3275
+ | TOK_CPROVER_ASSIGNS ' (' ' )'
3276
+ {
3277
+ $$=$1 ;
3278
+ set ($$, ID_C_spec_assigns);
3279
+ parser_stack ($$).add_to_operands (exprt (ID_target_list));
3280
+ }
3275
3281
;
3276
3282
3277
3283
cprover_function_contract_sequence:
You can’t perform that action at this time.
0 commit comments