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)
2020 return global ;
2121}
2222
23+ void qux (void ) __CPROVER_assigns ()
24+ {
25+ global = global + 1 ;
26+ }
27+
2328int main ()
2429{
2530 int n ;
2631 n = foo (& n );
2732 n = baz ();
33+ qux ();
2834 return 0 ;
2935}
Original file line number Diff line number Diff line change 33--enforce-all-contracts
44^EXIT=10$
55^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$
89^VERIFICATION FAILED$
910--
1011--
Original file line number Diff line number Diff line change @@ -3250,6 +3250,12 @@ cprover_contract:
32503250 parser_stack ($3 ).id (ID_target_list);
32513251 mto ($$, $3 );
32523252 }
3253+ | TOK_CPROVER_ASSIGNS ' (' ' )'
3254+ {
3255+ $$=$1 ;
3256+ set ($$, ID_C_spec_assigns);
3257+ parser_stack ($$).add_to_operands (exprt (ID_target_list));
3258+ }
32533259 ;
32543260
32553261cprover_contract_sequence:
You can’t perform that action at this time.
0 commit comments