source:
CIVL/examples/mem/mem_tests/mem_no_intersect_array2d-bad.cvl@
afc300c
| Last change on this file since afc300c was 848eb9b, checked in by , 7 years ago | |
|---|---|
|
|
| File size: 357 bytes | |
| Line | |
|---|---|
| 1 | #include<mem.cvh> |
| 2 | #include<stdlib.h> |
| 3 | |
| 4 | $input int N; |
| 5 | $assume(N > 10); |
| 6 | int a[2*N][2*N]; |
| 7 | |
| 8 | int main() { |
| 9 | |
| 10 | $mem m = ($mem)&a[N .. 2*N-1][N .. 2*N-1]; |
| 11 | $mem n = ($mem)&a[5 .. N + 5][N .. N + 5]; |
| 12 | $mem out0, out1; |
| 13 | _Bool noOverlap; |
| 14 | |
| 15 | noOverlap = $mem_no_intersect(m, n, &out0, &out1); |
| 16 | $assert(noOverlap, "\"%p\" and \"%p\" may intersect \n", out0, out1); |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
