1 ! RUN: %python %S/../test_errors.py %s %flang -fopenacc
3 ! Check OpenACC restruction in branch in and out of some construct
5 program openacc_clause_validity
17 !ERROR: RETURN statement is not allowed in a PARALLEL construct
32 ! Exit branches out of parallel construct, not attached to an OpenACC parallel construct.
38 ifname
: if (j
== 2) then
43 !ERROR: EXIT to construct 'name1' outside of PARALLEL construct is not allowed
45 ! Exit to construct other than loops.
53 ! Exit branches out of parallel construct, attached to an OpenACC parallel construct.
55 fortname
: if (.true
.) then
58 !ERROR: EXIT to construct 'fortname' outside of PARALLEL construct is not allowed
64 !ERROR: EXIT to construct 'name1' outside of PARALLEL construct is not allowed
71 !ERROR: EXIT to construct 'thisblk' outside of PARALLEL construct is not allowed
79 !Exit branches inside OpenACC construct.
84 ifname
: if (i
== 2) then
96 !ERROR: STOP statement is not allowed in a PARALLEL construct
105 !ERROR: RETURN statement is not allowed in a KERNELS construct
123 !ERROR: STOP statement is not allowed in a KERNELS construct
132 !ERROR: RETURN statement is not allowed in a SERIAL construct
149 ifname
: if (.true
.) then
153 !ERROR: EXIT to construct 'name2' outside of SERIAL construct is not allowed
166 !ERROR: STOP statement is not allowed in a SERIAL construct
172 end program openacc_clause_validity