[AArch64] Fix brackets warning in assert. NFC
[llvm-project.git] / flang / test / Semantics / OpenACC / acc-host-data.f90
blob4e9167722a228b249e80ad535499993f7cbef8a3
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenacc
3 ! Check OpenACC clause validity for the following construct and directive:
4 ! 2.8 host_data
6 program openacc_host_data_validity
8 implicit none
10 integer, parameter :: N = 256
11 real(8), dimension(N, N) :: aa, bb
12 logical :: ifCondition = .TRUE.
14 !ERROR: At least one of USE_DEVICE clause must appear on the HOST_DATA directive
15 !$acc host_data
16 !$acc end host_data
18 !$acc host_data use_device(aa)
19 !$acc end host_data
21 !$acc host_data use_device(aa) if(.true.)
22 !$acc end host_data
24 !$acc host_data use_device(aa) if(ifCondition)
25 !$acc end host_data
27 !$acc host_data use_device(aa, bb) if_present
28 !$acc end host_data
30 !ERROR: At most one IF_PRESENT clause can appear on the HOST_DATA directive
31 !$acc host_data use_device(aa, bb) if_present if_present
32 !$acc end host_data
34 !$acc host_data use_device(aa, bb) if(.true.) if_present
35 !$acc end host_data
37 !ERROR: At most one IF clause can appear on the HOST_DATA directive
38 !$acc host_data use_device(aa, bb) if(.true.) if(ifCondition)
39 !$acc end host_data
41 end program openacc_host_data_validity