typedefread_onlyintIntRO; // expected-error {{access qualifier can only be used for pipe and image type}}
voidmyWrite(write_onlyimage1d_t); // expected-note {{passing argument to parameter here}} expected-note {{passing argument to parameter here}}
voidmyRead(read_onlyimage1d_t); // expected-note {{passing argument to parameter here}}
#if__OPENCL_C_VERSION__>=200
voidmyReadWrite(read_writeimage1d_t);
#else
voidmyReadWrite(read_writeimage1d_t); // expected-error {{access qualifier 'read_write' can not be used for '__read_write image1d_t' prior to OpenCL version 2.0}}
#endif
kernelvoidk1(img1d_woimg){
myRead(img); // expected-error {{passing 'img1d_wo' (aka '__write_only image1d_t') to parameter of incompatible type '__read_only image1d_t'}}
}
kernelvoidk2(img1d_roimg){
myWrite(img); // expected-error {{passing 'img1d_ro' (aka '__read_only image1d_t') to parameter of incompatible type '__write_only image1d_t'}}
}
kernelvoidk3(img1d_woimg){
myWrite(img);
}
#if__OPENCL_C_VERSION__>=200
kernelvoidk4(img1d_rwimg){
myReadWrite(img);
}
#endif
kernelvoidk5(img1d_ro_defaultimg){
myWrite(img); // expected-error {{passing 'img1d_ro_default' (aka '__read_only image1d_t') to parameter of incompatible type '__write_only image1d_t'}}