Consider the following code:
__global__ void kernel(int *something) {
extern __shared__ int shared_array[];
// Some operations on shared_array here.
}
No. Shared memory is uninitialised. You have to somehow initialise it yourself, one way or another...
From CUDA C Programming Guide 3.2, Section B.2.4.2, paragraph 2:
__shared__variables cannot have an initialization as part of their declaration.
This also discards nontrivial default constructors for shared variables.