1 // RUN: %clang_cc1 %s -fopenacc -verify
3 struct NotConvertible
{} NC
;
10 #pragma acc data copyin(arr[0]) wait
13 #pragma acc enter data copyin(arr[0]) wait()
15 #pragma acc exit data copyout(arr[0]) wait(getS(), getI())
17 // expected-error@+1{{OpenACC 'wait' clause is not valid on 'host_data' directive}}
18 #pragma acc host_data use_device(arr) wait(getS(), getI())
21 #pragma acc data copyin(arr[0]) wait(devnum:getS(): getI())
24 #pragma acc enter data copyin(arr[0]) wait(devnum:getS(): queues: getI()) wait(devnum:getI(): queues: getS(), getI(), 5)
26 // expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('struct NotConvertible' invalid)}}
27 #pragma acc exit data copyout(arr[0]) wait(devnum:NC : 5)
29 // expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('struct NotConvertible' invalid)}}
30 #pragma acc data copyin(arr[0]) wait(devnum:5 : NC)
33 // expected-error@+3{{OpenACC clause 'wait' requires expression of integer type ('int[5]' invalid)}}
34 // expected-error@+2{{OpenACC clause 'wait' requires expression of integer type ('int[5]' invalid)}}
35 // expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('struct NotConvertible' invalid)}}
36 #pragma acc enter data copyin(arr[0]) wait(devnum:arr : queues: arr, NC, 5)
38 // expected-error@+1{{OpenACC 'wait' clause is not valid on 'loop' directive}}
40 for(int i
= 5; i
< 10;++i
);