1*67e74705SXin Li// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only 2*67e74705SXin Li 3*67e74705SXin Livoid img2d_ro(__read_only image2d_t img) {} // expected-note{{passing argument to parameter 'img' here}} expected-note{{passing argument to parameter 'img' here}} 4*67e74705SXin Li 5*67e74705SXin Livoid imgage_access_test(image2d_t img2dro, write_only image2d_t img2dwo, image3d_t img3dro) { 6*67e74705SXin Li img2d_ro(img2dro); 7*67e74705SXin Li img2d_ro(img2dwo); // expected-error{{passing '__write_only image2d_t' to parameter of incompatible type '__read_only image2d_t'}} 8*67e74705SXin Li img2d_ro(img3dro); // expected-error{{passing '__read_only image3d_t' to parameter of incompatible type '__read_only image2d_t'}} 9*67e74705SXin Li} 10