|
8 | 8 | // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple amdgcn-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
|
9 | 9 | // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple amdgcn-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES
|
10 | 10 |
|
| 11 | +// RUN: %clang_cc1 -x cl -cl-std=CL3.0 %s -verify -triple amdgcn-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES |
| 12 | +// RUN: %clang_cc1 -x cl -cl-std=CL3.0 %s -verify -triple amdgcn-unknown-unknown -target-cpu gfx700 -Wpedantic-core-features -DTEST_CORE_FEATURES -DFLAT_SUPPORT |
| 13 | + |
11 | 14 | // Extensions in all versions
|
12 | 15 | #ifndef cl_clang_storage_class_specifiers
|
13 | 16 | #error "Missing cl_clang_storage_class_specifiers define"
|
|
156 | 159 | #pragma OPENCL EXTENSION cl_amd_media_ops2: enable
|
157 | 160 |
|
158 | 161 | #if (__OPENCL_C_VERSION__ >= 300)
|
159 |
| -#ifndef __opencl_c_generic_address_space |
160 |
| -#error "Missing __opencl_c_generic_address_space define" |
161 |
| -#else |
162 |
| -#error "Incorrect __opencl_c_generic_address_space define" |
| 162 | + #ifndef __opencl_c_program_scope_global_variables |
| 163 | + #error "Missing __opencl_c_program_scope_global_variables define" |
| 164 | + #endif |
163 | 165 | #endif
|
164 |
| -#pragma OPENCL EXTENSION __opencl_c_generic_address_space: enable |
| 166 | + |
| 167 | +#if (__OPENCL_C_VERSION__ >= 300) |
| 168 | + #ifdef FLAT_SUPPORT |
| 169 | + #ifndef __opencl_c_generic_address_space |
| 170 | + #error "Missing __opencl_c_generic_address_space define" |
| 171 | + #endif |
| 172 | + #else |
| 173 | + #ifdef __opencl_c_generic_address_space |
| 174 | + #error "Incorrect __opencl_c_generic_address_space define" |
| 175 | + #endif |
| 176 | + #endif |
| 177 | +#endif |
| 178 | + |
| 179 | +#if (__OPENCL_C_VERSION__ >= 300) |
| 180 | + #ifdef FLAT_SUPPORT |
| 181 | + #ifndef __opencl_c_device_enqueue |
| 182 | + #error "Missing __opencl_c_device_enqueue define" |
| 183 | + #endif |
| 184 | + #else |
| 185 | + #ifdef __opencl_c_device_enqueue |
| 186 | + #error "Incorrect __opencl_c_device_enqueue define" |
| 187 | + #endif |
| 188 | + #endif |
165 | 189 | #endif
|
0 commit comments