xref: /llvm-project/flang/test/Semantics/OpenACC/acc-combined-loop.f90 (revision 16cf9c9af00422b6cc7f2d3742152c4a5c9d2a1d)
1! RUN: %python %S/../test_errors.py %s %flang -fopenacc
2
3program openacc_combined_loop
4  implicit none
5  integer :: i
6
7  i = 1
8
9  !ERROR: A DO loop must follow the PARALLEL LOOP directive
10  !$acc parallel loop
11  i = 1
12
13  !ERROR: A DO loop must follow the KERNELS LOOP directive
14  !$acc kernels loop
15  i = 1
16
17  !ERROR: A DO loop must follow the SERIAL LOOP directive
18  !$acc serial loop
19  i = 1
20
21  !$acc parallel loop
22  do 10 i=0, n
23  10 continue
24
25  !$acc kernels loop
26  do 20 i=0, n
27  20 continue
28
29  !$acc serial loop
30  do 30 i=0, n
31  30 continue
32
33end
34