segmentation fault when using incorrect type of functions parameters

Consider following kernel:

[codebox]__kernel void typeError(void)


int intVal = 10;

int tmp;

// for (int ix = 2; ix < 1; ++ix)

  tmp = fmax(intVal, intVal);

}[/codebox]If I try to execute it, I will get an error as I am trying to use function fmax, which expects some kind of float as parameter and I’m calling it with integer (this is OK). When I uncomment the line with ‘for’ loop, I get SEGMENTATION_FAULT instead of a correct error description (notice that the cycle should not even execute due to the range of ix, but also ‘real’ cycle won’t work). Any idea why am I getting segmentation fault?

Tested configurations (minimal working example attached):

CentOS 5.4, 64bit, driver version: 195.36.15, SDK version: 4954966, Tesla C1060

CentOS 5.4, 64bit, driver version: 195.36.24, SDK revision: 5537818, GeForce GTX 285
typeError.tar.gz (2.01 KB)