55 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if 3! it belongs to that construct or an outer construct.4 5subroutine do_concurrent_test1(n)6 implicit none7 integer :: n8 integer :: j,k9 mydoc: do concurrent(j=1:n)10 mydo: do k=1,n11!ERROR: EXIT must not leave a DO CONCURRENT statement12 if (k==5) exit mydoc13 if (j==10) exit mydo14 end do mydo15 end do mydoc16end subroutine do_concurrent_test117 18subroutine do_concurrent_test2(n)19 implicit none20 integer :: j,k,n21 mydoc: do concurrent(j=1:n)22!ERROR: EXIT must not leave a DO CONCURRENT statement23 if (k==5) exit24 end do mydoc25end subroutine do_concurrent_test226 27subroutine do_concurrent_test3(n)28 implicit none29 integer :: j,k,n30 mytest3: if (n>0) then31 mydoc: do concurrent(j=1:n)32 do k=1,n33!ERROR: EXIT must not leave a DO CONCURRENT statement34 if (j==10) exit mytest335 end do36 end do mydoc37 end if mytest338end subroutine do_concurrent_test339 40subroutine do_concurrent_test4(n)41 implicit none42 integer :: j,k,n43 mytest4: if (n>0) then44 mydoc: do concurrent(j=1:n)45 do concurrent(k=1:n)46!ERROR: EXIT must not leave a DO CONCURRENT statement47 if (k==5) exit48!ERROR: EXIT must not leave a DO CONCURRENT statement49!ERROR: EXIT must not leave a DO CONCURRENT statement50 if (j==10) exit mytest451 end do52 end do mydoc53 end if mytest454end subroutine do_concurrent_test455