flang/test/Semantics/OpenACC/acc-resolve03.f90
raw| 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 |
| 5 | subroutine 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 |
| 21 | end subroutine foo |