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
56 !PORTABILITY: The construct name 'name1' should be distinct at the subprogram level
59 !ERROR: EXIT to construct 'fortname' outside of PARALLEL construct is not allowed
65 !ERROR: EXIT to construct 'name1' outside of PARALLEL construct is not allowed
72 !ERROR: EXIT to construct 'thisblk' outside of PARALLEL construct is not allowed
80 !Exit branches inside OpenACC construct.
85 ifname
: if (i
== 2) then
105 !ERROR: RETURN statement is not allowed in a KERNELS construct
131 !ERROR: RETURN statement is not allowed in a SERIAL construct
148 ifname
: if (.true
.) then
152 !ERROR: EXIT to construct 'name2' outside of SERIAL construct is not allowed
170 end program openacc_clause_validity