[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / doconcurrent05.f90
bloba826e06dcb075951674834ce85d1ca9477bc2f82
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
3 ! it belongs to that construct or an outer construct.
5 subroutine do_concurrent_test1(n)
6 implicit none
7 integer :: n
8 integer :: j,k
9 mydoc: do concurrent(j=1:n)
10 mydo: do k=1,n
11 !ERROR: EXIT must not leave a DO CONCURRENT statement
12 if (k==5) exit mydoc
13 if (j==10) exit mydo
14 end do mydo
15 end do mydoc
16 end subroutine do_concurrent_test1
18 subroutine do_concurrent_test2(n)
19 implicit none
20 integer :: j,k,n
21 mydoc: do concurrent(j=1:n)
22 !ERROR: EXIT must not leave a DO CONCURRENT statement
23 if (k==5) exit
24 end do mydoc
25 end subroutine do_concurrent_test2
27 subroutine do_concurrent_test3(n)
28 implicit none
29 integer :: j,k,n
30 mytest3: if (n>0) then
31 mydoc: do concurrent(j=1:n)
32 do k=1,n
33 !ERROR: EXIT must not leave a DO CONCURRENT statement
34 if (j==10) exit mytest3
35 end do
36 end do mydoc
37 end if mytest3
38 end subroutine do_concurrent_test3
40 subroutine do_concurrent_test4(n)
41 implicit none
42 integer :: j,k,n
43 mytest4: if (n>0) then
44 mydoc: do concurrent(j=1:n)
45 do concurrent(k=1:n)
46 !ERROR: EXIT must not leave a DO CONCURRENT statement
47 if (k==5) exit
48 !ERROR: EXIT must not leave a DO CONCURRENT statement
49 !ERROR: EXIT must not leave a DO CONCURRENT statement
50 if (j==10) exit mytest4
51 end do
52 end do mydoc
53 end if mytest4
54 end subroutine do_concurrent_test4