1*ad599211SShilei Tian// REQUIRES: amdgpu-registered-target 2*ad599211SShilei Tian// RUN: %clang_cc1 -verify -cl-std=CL1.2 -triple amdgcn-amd-amdhsa -Wno-unused-value %s 3*ad599211SShilei Tian// RUN: %clang_cc1 -verify -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -Wno-unused-value %s 4*ad599211SShilei Tian 5*ad599211SShilei Tianvoid foo() { 6*ad599211SShilei Tian int n = 100; 7*ad599211SShilei Tian __amdgpu_buffer_rsrc_t v = 0; // expected-error {{initializing '__private __amdgpu_buffer_rsrc_t' with an expression of incompatible type 'int'}} 8*ad599211SShilei Tian int c = v; // expected-error {{initializing '__private int' with an expression of incompatible type '__private __amdgpu_buffer_rsrc_t'}} 9*ad599211SShilei Tian __amdgpu_buffer_rsrc_t k; 10*ad599211SShilei Tian int *ip = (int *)k; // expected-error {{operand of type '__amdgpu_buffer_rsrc_t' where arithmetic or pointer type is required}} 11*ad599211SShilei Tian void *vp = (void *)k; // expected-error {{operand of type '__amdgpu_buffer_rsrc_t' where arithmetic or pointer type is required}} 12*ad599211SShilei Tian } 13