Valentin Clement (バレンタイン クレメン) d2e7a15dfb
[flang][openacc] Warn about misplaced end loop directive and ignore it (#69512)
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.
2023-10-19 08:49:01 -07:00

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