brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 53422fa Raw
73 lines · plain
1// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=-__opencl_c_images,-__opencl_c_read_write_images,-cl_khr_3d_image_writes,-__opencl_c_3d_image_writes %s2// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=+__opencl_c_images,+__opencl_c_read_write_images,+cl_khr_3d_image_writes,+__opencl_c_3d_image_writes %s3// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=CL3.0 -cl-ext=+__opencl_c_images,+__opencl_c_read_write_images,-cl_khr_3d_image_writes,-__opencl_c_3d_image_writes %s4// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=clc++2021 -cl-ext=-__opencl_c_images,-__opencl_c_read_write_images,-cl_khr_3d_image_writes,-__opencl_c_3d_image_writes %s5// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=clc++2021 -cl-ext=+__opencl_c_images,+__opencl_c_read_write_images,+cl_khr_3d_image_writes,+__opencl_c_3d_image_writes %s6// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -cl-std=clc++2021 -cl-ext=+__opencl_c_images,+__opencl_c_read_write_images,-cl_khr_3d_image_writes,-__opencl_c_3d_image_writes %s7 8#if defined(__opencl_c_images) && defined(__opencl_c_3d_image_writes)9//expected-no-diagnostics10#endif11 12void test1(image1d_t i) {}13#if !defined(__opencl_c_images)14// expected-error@-2{{use of type '__read_only image1d_t' requires __opencl_c_images support}}15#endif16 17void test2(image2d_t i) {}18#if !defined(__opencl_c_images)19// expected-error@-2{{use of type '__read_only image2d_t' requires __opencl_c_images support}}20#endif21 22void test3(image1d_array_t i) {}23#if !defined(__opencl_c_images)24// expected-error@-2{{use of type '__read_only image1d_array_t' requires __opencl_c_images support}}25#endif26 27void test4(image2d_array_t i) {}28#if !defined(__opencl_c_images)29// expected-error@-2{{use of type '__read_only image2d_array_t' requires __opencl_c_images support}}30#endif31 32void test5(image2d_depth_t i) {}33#if !defined(__opencl_c_images)34// expected-error@-2{{use of type '__read_only image2d_depth_t' requires __opencl_c_images support}}35#endif36 37void test6(image1d_buffer_t i) {}38#if !defined(__opencl_c_images)39// expected-error@-2{{use of type '__read_only image1d_buffer_t' requires __opencl_c_images support}}40#endif41 42void test7(image2d_msaa_t i) {}43#if !defined(__opencl_c_images)44// expected-error@-2{{use of type '__read_only image2d_msaa_t' requires __opencl_c_images support}}45#endif46 47void test8(image2d_array_msaa_t i) {}48#if !defined(__opencl_c_images)49// expected-error@-2{{use of type '__read_only image2d_array_msaa_t' requires __opencl_c_images support}}50#endif51 52void test9(image2d_msaa_depth_t i) {}53#if !defined(__opencl_c_images)54// expected-error@-2{{use of type '__read_only image2d_msaa_depth_t' requires __opencl_c_images support}}55#endif56 57void test10(image2d_array_msaa_depth_t i) {}58#if !defined(__opencl_c_images)59// expected-error@-2{{use of type '__read_only image2d_array_msaa_depth_t' requires __opencl_c_images support}}60#endif61 62void test11(sampler_t s) {}63#if !defined(__opencl_c_images)64// expected-error@-2{{use of type 'sampler_t' requires __opencl_c_images support}}65#endif66 67void test12(write_only image3d_t i) {}68#if !defined(__opencl_c_images)69// expected-error@-2{{use of type '__write_only image3d_t' requires __opencl_c_images support}}70#elif !defined(__opencl_c_3d_image_writes)71// expected-error@-4{{use of type '__write_only image3d_t' requires cl_khr_3d_image_writes and __opencl_c_3d_image_writes support}}72#endif73