1 ! RUN: %S/../test_errors.sh %s %t %flang -fopenacc
4 ! Check OpenACC clause validity for the following construct and directive:
7 program openacc_shutdown_validity
12 integer, parameter :: N
= 256
13 logical :: ifCondition
= .TRUE
.
14 real(8), dimension(N
) :: a
17 !ERROR: Directive SHUTDOWN may not be called within a compute region
22 !ERROR: Directive SHUTDOWN may not be called within a compute region
27 !ERROR: Directive SHUTDOWN may not be called within a compute region
34 !ERROR: Directive SHUTDOWN may not be called within a compute region
43 !ERROR: Directive SHUTDOWN may not be called within a compute region
52 !ERROR: Directive SHUTDOWN may not be called within a compute region
60 !ERROR: Directive SHUTDOWN may not be called within a compute region
67 !ERROR: Directive SHUTDOWN may not be called within a compute region
74 !ERROR: Directive SHUTDOWN may not be called within a compute region
80 !$acc shutdown if(.TRUE.)
81 !$acc shutdown if(ifCondition)
82 !$acc shutdown device_num(1)
83 !$acc shutdown device_num(i)
84 !$acc shutdown device_type(i)
85 !$acc shutdown device_type(2, i, j)
86 !$acc shutdown device_num(i) device_type(i, j) if(ifCondition)
88 !ERROR: At most one IF clause can appear on the SHUTDOWN directive
89 !$acc shutdown if(.TRUE.) if(ifCondition)
91 !ERROR: At most one DEVICE_NUM clause can appear on the SHUTDOWN directive
92 !$acc shutdown device_num(1) device_num(i)
94 !ERROR: At most one DEVICE_TYPE clause can appear on the SHUTDOWN directive
95 !$acc shutdown device_type(2) device_type(i, j)
97 end program openacc_shutdown_validity