#include <civlc.cvh>
#include <stdio.h>

$scope root = $here;

void main(){

  int **p;
  int ret;

  p = (int **)$malloc(root, sizeof(int *) * 10);
  for(int i=0; i<10; i++){
    p[i] = (int *)$malloc(root, sizeof(int) * 10);
    for(int j = 0; j<10; j++)
     p[i][j] = i;
  }
  
  ret = *(&p[0][0] + 10);
  for(int i=0; i<10; i++)
   $free(p[i]);
  $free(p);
}
