source: CIVL/examples/library/civlc/bundleAndHeap.cvl@ 83af34d

1.23 2.0 main test-branch
Last change on this file since 83af34d was a4a8ef7, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

fixed the heap object renaming bug related to bundle pack/unpack.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1473 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 294 bytes
Line 
1#include <civlc.cvh>
2#include <bundle.cvh>
3
4$input int N;
5$assume N > 2;
6$input int a[N];
7
8int main(){
9 int * b;
10 $bundle bun;
11
12 b = (int *)$malloc($root, N * sizeof(int));
13 bun = $bundle_pack(a, sizeof(int) * N);
14 $bundle_unpack(bun, b);
15 $assert b[0] == a[0];
16 $free(b);
17 return 0;
18}
Note: See TracBrowser for help on using the repository browser.