xref: /llvm-project/flang/test/Semantics/OpenACC/acc-resolve03.f90 (revision 9b1915cd0a52e785b29021dc3329265345d2b068)
1! RUN: %flang_fc1 -fopenacc %s
2! A regression test to check that
3! arbitrary compiler directives do not generate errors
4! inside OpenACC collapsed loops
5subroutine foo
6  integer, parameter :: loop_bound = 42
7  integer :: a
8  integer :: b
9  integer :: c
10
11  !$acc parallel
12  do a = 0, loop_bound
13    !$acc loop collapse(2)
14    do b = 0, loop_bound
15      !dir$ ivdep
16      do c = 0, loop_bound
17      enddo
18    enddo
19  enddo
20  !$acc end parallel
21end subroutine foo
22