| 1 |
//RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
kernel 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 |
|
| 9 |
kernel 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 |
|
| 14 |
kernel 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 |
} |