error about using structure by shared memory

I have a strange problem. My codes are:

global void
func1(struct node *A, int size)
{
extern shared struct node g_A;

unsigned int tid = threadIdx.x;
unsigned int i = blockIdx.x * blockDim.x + tid;
unsigned int sum = 2;
int gridsize = 512;

while(i<size)
{
	g_A[tid] = A[i];
	g_A[tid].key += sum;
	sum = g_L[tid].key;
	i += gridsize;
}

}

the complier reports error “expression must be a pointer to a complete object type” for line 13, 14 and 15, where I use g_A[tid]
I also tried to use (g_A+i)->key but it doesn’t work as well.

Any suggestions? Thanks!