File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
tests/regression/27-inv_invariants Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 33#include <stdlib.h>
44#include <time.h>
55
6+ int more_intricate () {
7+ int arr [20 ];
8+
9+ int top ;
10+
11+ int i = 2 ;
12+ int j = 8 ;
13+ if (top ) {
14+ i = 8 ;
15+ j = 9 ;
16+ }
17+
18+ int * imprecise1 = & arr [i ]; // &arr[2..8]
19+ int * imprecise2 = & arr [j ]; // &arr[8..9]
20+
21+ if (imprecise1 == imprecise2 ) {
22+ __goblint_check (imprecise1 == & arr [8 ]);
23+ __goblint_check (imprecise2 == & arr [8 ]); //TODO (Refinement should happen in both directions!)
24+ }
25+
26+ if (imprecise1 == & arr [j ]) {
27+ __goblint_check (imprecise1 == & arr [8 ]);
28+ }
29+
30+ }
31+
632
733int main () {
834 int arr [20 ];
@@ -20,5 +46,6 @@ int main() {
2046 __goblint_check (imprecise == & arr [2 ]);
2147 }
2248
49+ more_intricate ();
2350 return 0 ;
2451}
You can’t perform that action at this time.
0 commit comments