mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 17:36:36 +00:00

Instead of raising an error for a misplaced `end loop directive`, just warn about it and ignore it. This directive is an extension and is optional.
30 lines
499 B
Fortran
30 lines
499 B
Fortran
! RUN: %python %S/../test_errors.py %s %flang -fopenacc
|
|
|
|
! Check parser specific error for OpenACC
|
|
|
|
|
|
subroutine test(a, n)
|
|
integer :: a(n)
|
|
!ERROR: expected OpenACC directive
|
|
!$acc p
|
|
integer :: i,j
|
|
|
|
i = 0
|
|
!ERROR: expected OpenACC directive
|
|
!$acc p
|
|
end subroutine
|
|
|
|
subroutine test2(a, n)
|
|
integer :: a(n)
|
|
integer :: i
|
|
|
|
!$acc parallel
|
|
!$acc loop
|
|
DO i = 1, n
|
|
END DO
|
|
!$acc end parallel
|
|
!WARN: Misplaced OpenACC end directive
|
|
!$acc end loop
|
|
|
|
end subroutine
|