1! RUN: %S/test_any.sh %s %flang %t
2! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
3! CHECK-NOT: exit from DO CONCURRENT construct
4
5subroutine do_concurrent_test1(n)
6  implicit none
7  integer :: j,k,l,n
8  mytest: if (n>0) then
9  mydoc:    do concurrent(j=1:n)
10              mydo: do k=1,n
11                      if (k==5) exit
12                      if (k==6) exit mydo
13                    end do mydo
14              do concurrent(l=1:n)
15                if (l==5) print *, "test"
16              end do
17            end do mydoc
18            do k=1,n
19              if (k==5) exit mytest
20            end do
21          end if mytest
22end subroutine do_concurrent_test1
23
24subroutine do_concurrent_test2(n)
25  implicit none
26  integer :: i1,i2,i3,i4,i5,i6,n
27  mytest2: if (n>0) then
28  nc1:       do concurrent(i1=1:n)
29  nc2:         do i2=1,n
30  nc3:           do concurrent(i3=1:n)
31  nc4:             do i4=1,n
32                     if (i3==4) exit nc4
33  nc5:               do concurrent(i5=1:n)
34  nc6:                 do i6=1,n
35                         if (i6==10) print *, "hello"
36                       end do nc6
37                     end do nc5
38                   end do nc4
39                 end do nc3
40               end do nc2
41             end do nc1
42           end if mytest2
43end subroutine do_concurrent_test2
44