Compiler Bug?


I’m developing an application using CUDA 2.0 beta on Debian GNU/Linux with a 8400M GT card.

Lately I’ve got a problem with the following code:

texture< uint2, 1 >    table;

uint                debugInfo[5];

uint     h = hash(...);

uint2    texel0 = tex1Dfetch( table, 15829 );

uint2    texel1 = tex1Dfetch( table, h );

debugInfo[0] = h;

debugInfo[1] = texel0.x;

debugInfo[2] = texel0.y;

debugInfo[3] = texel1.x;

debugInfo[4] = texel1.y;

Then, I memcopy the debugInfo array to host memory and print it. I obtain the following result:

15829 0 2162688 0 0

That is: h is 15829, but the two texture fetches return different results. Why?