[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / SemaOpenACC / compute-construct-vector_length-clause.c
blobeda2d5e251b25268eae14756d56b57625415b73f
1 // RUN: %clang_cc1 %s -fopenacc -verify
3 short getS();
5 void Test() {
6 #pragma acc parallel vector_length(1)
7 while(1);
8 #pragma acc kernels vector_length(1)
9 while(1);
11 // expected-error@+1{{OpenACC 'vector_length' clause is not valid on 'serial' directive}}
12 #pragma acc serial vector_length(1)
13 while(1);
15 struct NotConvertible{} NC;
16 // expected-error@+1{{OpenACC clause 'vector_length' requires expression of integer type ('struct NotConvertible' invalid)}}
17 #pragma acc parallel vector_length(NC)
18 while(1);
20 #pragma acc kernels vector_length(getS())
21 while(1);
23 struct Incomplete *SomeIncomplete;
25 // expected-error@+1{{OpenACC clause 'vector_length' requires expression of integer type ('struct Incomplete' invalid)}}
26 #pragma acc kernels vector_length(*SomeIncomplete)
27 while(1);
29 enum E{A} SomeE;
31 #pragma acc kernels vector_length(SomeE)
32 while(1);
34 // expected-error@+1{{OpenACC 'vector_length' clause is not valid on 'loop' directive}}
35 #pragma acc loop vector_length(1)
36 for(;;);