47 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror2! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenacc -Werror3 4subroutine empty5 ! WARNING: A DO loop must follow the VECTOR ALWAYS directive6 !dir$ vector always7 ! WARNING: A DO loop must follow the UNROLL directive8 !dir$ unroll9end subroutine empty10 11subroutine non_do12 ! WARNING: A DO loop must follow the VECTOR ALWAYS directive13 !dir$ vector always14 ! WARNING: A DO loop must follow the UNROLL directive15 !dir$ unroll16 a = 117end subroutine non_do18 19subroutine execution_part20 do i=1,1021 ! WARNING: A DO loop must follow the VECTOR ALWAYS directive22 !dir$ vector always23 ! WARNING: A DO loop must follow the UNROLL directive24 !dir$ unroll25 end do26end subroutine execution_part27 28! OK29subroutine test_vector_always_before_acc(a, b, c)30 real, dimension(10) :: a,b,c31 !dir$ vector always32 !$acc loop33 do i=1,N34 a(i) = b(i) + c(i)35 enddo36end subroutine37 38! OK39subroutine test_unroll_before_acc(a, b, c)40 real, dimension(10) :: a,b,c41 !dir$ unroll42 !$acc loop43 do i=1,N44 a(i) = b(i) + c(i)45 enddo46end subroutine47