clBuildProgram crash

Some peole may find this interesting

While debugging OpenCL/OpenGL interop I had the following kerne

Note both read and write are commented out.

__kernel void ModifyTexture(
__write_only image2d_t p_outTexture,
__read_only image2d_t p_inTexture
size_t xPos = get_global_id(0);
size_t yPos = get_global_id(1);

int2 globalCoords = (int2)(xPos,yPos);

// float4 vColour = read_imagef(p_inTexture, imageSampler, globalCoords);
float4 vColour;
vColour.x = 0;
vColour.y = 1;
vColour.z = 0;
vColour.w = 1;

// write_imagef(p_outTexture,globalCoords,vColour);

This caused a crash when clBuildProgram was run

It appears if you do not have a read or write to at least one of the texture arguments clBuildProgram may crash

My original kernel was actually much more complex so it took a while to find the route cause of the crash