| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 |
| 2 |
// REQUIRES: amdgpu-registered-target |
| 3 |
// RUN: %clang_cc1 -verify -cl-std=CL1.2 -triple amdgcn-amd-amdhsa %s |
| 4 |
// RUN: %clang_cc1 -verify -cl-std=CL2.0 -triple amdgcn-amd-amdhsa %s |
| 5 |
|
| 6 |
void f() { |
| 7 |
int n = 3; |
| 8 |
__amdgpu_texture_t v = (__amdgpu_texture_t)0; // expected-error {{used type '__amdgpu_texture_t' where arithmetic or pointer type is required}} |
| 9 |
int k = v; // expected-error {{initializing '__private int' with an expression of incompatible type '__private __amdgpu_texture_t'}} |
| 10 |
(void)(v + v); // expected-error {{invalid operands}} |
| 11 |
__amdgpu_texture_t r; |
| 12 |
int *p = (int*)r; // expected-error {{operand of type '__amdgpu_texture_t' where arithmetic or pointer type is required}} |
| 13 |
} |