brintos

brintos / llvm-project-archived public Read only

0
0
Text · 628 B · 41385c1 Raw
18 lines · plain
1//RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s2 3kernel void C (global int *x) {4  int I = 3;5  __attribute__((opencl_unroll_hint(I))) // expected-error {{'opencl_unroll_hint' attribute requires an integer constant}}6  while (I--);7}8 9kernel void E() {10  __attribute__((opencl_unroll_hint(2,4))) // expected-error {{'opencl_unroll_hint' attribute takes no more than 1 argument}}11  for(int i=0; i<100; i++);12}13 14kernel void F() {15  __attribute__((opencl_unroll_hint(-1))) // expected-error {{'opencl_unroll_hint' attribute requires a positive integral compile time constant expression}}16  for(int i=0; i<100; i++);17}18