1 ! RUN: %python %S/../test_errors.py %s %flang -fopenacc
3 ! Check OpenACC clause validity for the following construct and directive:
6 program openacc_shutdown_validity
11 integer, parameter :: N
= 256
12 logical :: ifCondition
= .TRUE
.
13 real(8), dimension(N
) :: a
16 !ERROR: Directive SHUTDOWN may not be called within a compute region
21 !ERROR: Directive SHUTDOWN may not be called within a compute region
26 !ERROR: Directive SHUTDOWN may not be called within a compute region
33 !ERROR: Directive SHUTDOWN may not be called within a compute region
42 !ERROR: Directive SHUTDOWN may not be called within a compute region
51 !ERROR: Directive SHUTDOWN may not be called within a compute region
59 !ERROR: Directive SHUTDOWN may not be called within a compute region
66 !ERROR: Directive SHUTDOWN may not be called within a compute region
73 !ERROR: Directive SHUTDOWN may not be called within a compute region
79 !$acc shutdown if(.TRUE.)
80 !$acc shutdown if(ifCondition)
81 !$acc shutdown device_num(1)
82 !$acc shutdown device_num(i)
83 !$acc shutdown device_type(i)
84 !$acc shutdown device_type(2, i, j)
85 !$acc shutdown device_num(i) device_type(i, j) if(ifCondition)
87 !ERROR: At most one IF clause can appear on the SHUTDOWN directive
88 !$acc shutdown if(.TRUE.) if(ifCondition)
90 !ERROR: At most one DEVICE_NUM clause can appear on the SHUTDOWN directive
91 !$acc shutdown device_num(1) device_num(i)
93 !ERROR: At most one DEVICE_TYPE clause can appear on the SHUTDOWN directive
94 !$acc shutdown device_type(2) device_type(i, j)
96 end program openacc_shutdown_validity