diff options
Diffstat (limited to 'clang/test/Headers/opencl-c-header.cl')
-rw-r--r-- | clang/test/Headers/opencl-c-header.cl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Headers/opencl-c-header.cl b/clang/test/Headers/opencl-c-header.cl index d65a219da30..8183a8c1f79 100644 --- a/clang/test/Headers/opencl-c-header.cl +++ b/clang/test/Headers/opencl-c-header.cl @@ -80,6 +80,10 @@ void test_atomics(__generic volatile unsigned int* a) { } #endif +// Verify that ATOMIC_VAR_INIT is defined. +#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) +global atomic_int z = ATOMIC_VAR_INIT(99); +#endif //__OPENCL_C_VERSION__ // Verify that non-builtin cl_intel_planar_yuv extension is defined from // OpenCL 1.2 onwards. |