fortran cuda interface passing pointer from fortran and allocating memory on device

Hello,
I intend to pass pointer to cuda code and get it allocated a chunk on memory on device. Following is my code. Its getting compiled well, but output is incorrect. Can anyone help me out ?
FORTRAN code:–

PROGRAM memtest
USE iso_c_binding
INTERFACE
SUBROUTINE get_in(x,n) BIND(C,name=“get_in”)
USE iso_c_binding
TYPE(C_PTR) :: x
INTEGER(C_INT),VALUE :: n
END SUBROUTINE
END INTERFACE
TYPE(C_PTR) :: px
INTEGER,POINTER :: x( : )
INTEGER(C_INT) :: n=10
CALL get_in(px,n)
END PROGRAM

CUDA-Program in C
#include<stdlib.h>
#include<stdio.h>

extern “C” void get_in(int **x,int n)
{

int y=(int)calloc(n,sizeof(int));
y[0]=10;
x=(int**)malloc(sizeof(int*));

cudaMalloc((void**)x,nsizeof(int));
cudaMemcpy(x[0],y,n
sizeof(int),cudaMemcpyHostToDevice);
y[0]=11;

printf(“\ny0=%d”,y[0]);
cudaMemcpy(y,x[0],n*sizeof(int),cudaMemcpyDeviceToHost);
printf(“\ny0=%d”,y[0]);

}
compilers used: gcc 4.3.3
nvcc: release 3.0, V0.2.1221
Ideal output:
y0=11
y0=10

Actual output
y0=10
y10=10

Can anyone point out possible bug in my code ?

thanks and regards,
Nachiket