running the attached code on the 32-bit CPU OpenCL implementation contained in the 2.9 SDK results in either incorrect/random data being passed to the kernel (see the printf in the kernel--the expected value is "10000") or a segmentation fault (if the optimization-disabling build options are not passed--see the comment in the code). I suspect that the struct being passed to the kernel is causing issues with argument alignment.
It'd be great if you could confirm this bug and pass it on to the development team.
Thanks for your patience. I have reported this issue to the development team, and the team is looking into it.