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 @@ -3250,6 +3250,12 @@ cprover_contract:
3250
3250
parser_stack ($3 ).id (ID_target_list);
3251
3251
mto ($$, $3 );
3252
3252
}
3253
+ | TOK_CPROVER_ASSIGNS ' (' ' )'
3254
+ {
3255
+ $$=$1 ;
3256
+ set ($$, ID_C_spec_assigns);
3257
+ parser_stack ($$).add_to_operands (exprt (ID_target_list));
3258
+ }
3253
3259
;
3254
3260
3255
3261
cprover_contract_sequence:
You can’t perform that action at this time.
0 commit comments