[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ByteCode / opencl.cl
blob32cc000cefd30d016fdba6aafb448b8667900def
1 // RUN: %clang_cc1 -fsyntax-only -cl-std=CL2.0 -verify=ref,both %s
2 // RUN: %clang_cc1 -fsyntax-only -cl-std=CL2.0 -verify=expected,both %s -fexperimental-new-constant-interpreter
4 // both-no-diagnostics
6 typedef int int2 __attribute__((ext_vector_type(2)));
7 typedef int int3 __attribute__((ext_vector_type(3)));
8 typedef int int4 __attribute__((ext_vector_type(4)));
9 typedef int int8 __attribute__((ext_vector_type(8)));
10 typedef int int16 __attribute__((ext_vector_type(16)));
12 void foo(int3 arg1, int8 arg2) {
13 int4 auto1;
14 int16 *auto2;
15 int auto3;
16 int2 auto4;
17 struct S *incomplete1;
19 int res1[vec_step(arg1) == 4 ? 1 : -1];
20 int res2[vec_step(arg2) == 8 ? 1 : -1];
21 int res3[vec_step(auto1) == 4 ? 1 : -1];
22 int res4[vec_step(*auto2) == 16 ? 1 : -1];
23 int res5[vec_step(auto3) == 1 ? 1 : -1];
24 int res6[vec_step(auto4) == 2 ? 1 : -1];
25 int res7[vec_step(int2) == 2 ? 1 : -1];
26 int res8[vec_step(int3) == 4 ? 1 : -1];
27 int res9[vec_step(int4) == 4 ? 1 : -1];
28 int res10[vec_step(int8) == 8 ? 1 : -1];
29 int res11[vec_step(int16) == 16 ? 1 : -1];
30 int res12[vec_step(void) == 1 ? 1 : -1];
33 void negativeShift32(int a,int b) {
34 char array0[((int)1)<<40];
37 int2 A = {1,2};
38 int4 B = {(int2)(1,2), (int2)(3,4)};
41 constant int sz0 = 5;
42 kernel void testvla()
44 int vla0[sz0];