File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
tests/regression/pr-758.t Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ // Code from https://github.com/goblint/cil/pull/98
2+
3+ int main () {
4+ // for loop
5+ int x = 42 ;
6+ for (x = 0 ; x < 10 ; x ++ ) { // there shouldn't be invariants x <= 9, x <= 10 and 0 <= x before this line
7+ // ...
8+ }
9+
10+ // expression with side effect
11+ int i , k ;
12+ i = k = 0 ; // there shouldn't be invariant k == 0 before this line
13+
14+ // compound initializers
15+ struct kala {
16+ int kaal ;
17+ int hind ;
18+ };
19+
20+ struct kala a = {2 , 3 }; // there shouldn't be invariant a.kaal == 2 before this line
21+ return 0 ;
22+ }
Original file line number Diff line number Diff line change 1+ $ goblint -- enable ana.int.interval --enable witness.yaml.enabled pr-758.c
2+ [Info][Deadcode] Logical lines of code (LLoC) summary:
3+ live: 6
4+ dead: 0
5+ total: 6
6+ [Info][Witness] witness generation summary:
7+ total: 2
8+
9+ $ yamlWitnessStrip < witness.yml
10+ - entry_type: loop_invariant
11+ location:
12+ file_name: pr- 758 .c
13+ file_hash: $STRIPPED_FILE_HASH
14+ line: 21
15+ column: 2
16+ function : main
17+ loop_invariant:
18+ string: a.hind == 3
19+ type: assertion
20+ format: C
21+ - entry_type: loop_invariant
22+ location:
23+ file_name: pr- 758 .c
24+ file_hash: $STRIPPED_FILE_HASH
25+ line: 20
26+ column: 14
27+ function : main
28+ loop_invariant:
29+ string: i == 0
30+ type: assertion
31+ format: C
You can’t perform that action at this time.
0 commit comments