CUDA 3.0 Error? one method of defining arrays no longer works

Hey I think I found something amiss with CUDA 3.0. I brought my code from CUDA 2.3, using Tesla C1060 over to CUDA 3.0 system running Fermi 2050. My calculations no longer worked, and I’ve tracked it down to the following piece of code. The definition of the matrix using the brackets doesn’t work, which I saw by comparing the value at rotMatrix[2][1] and comparing to __sinf(angle_rad). rotMatrix values were always 0:

device float3
elevation_rotate(float angle_rad,float x,float y,float z)
// elevation is rotation about x axis
// multiply 1x3 matrix containing x,y,z by 3x3 rotation matrix
float rotMatrixX[3][3] = {{1,0,0},

float oldCoords[3] = {x,y,z};
// multiply matricies
float3 coord;
coord.x = oldCoords[0]*rotMatrixX[0][0] + oldCoords[1]*rotMatrixX[0][1] + oldCoords[2]*rotMatrixX[0][2];
coord.y = oldCoords[0]*rotMatrixX[1][0] + oldCoords[1]*rotMatrixX[1][1] + oldCoords[2]*rotMatrixX[1][2];
coord.z = oldCoords[0]*rotMatrixX[2][0] + oldCoords[1]*rotMatrixX[2][1] + oldCoords[2]*rotMatrixX[2][2];

return coord;


when the array is defined like this, it works. seems strange to me, I wonder if there are more things like this to find…
float rotMatrixX[3][3];
rotMatrixX[0][0] = 1;
rotMatrixX[0][1] = 0;
rotMatrixX[0][2] = 0;
rotMatrixX[1][0] = 0;
rotMatrixX[1][1] = __cosf(angle_rad);
rotMatrixX[1][2] = -1*__sinf(angle_rad);
rotMatrixX[2][0] = 0;
rotMatrixX[2][1] = __sinf(angle_rad);
rotMatrixX[2][2] = __cosf(angle_rad);