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
)
9 mydoc
: do concurrent(j
=1:n
)
11 !ERROR: EXIT must not leave a DO CONCURRENT statement
16 end subroutine do_concurrent_test1
18 subroutine do_concurrent_test2(n
)
21 mydoc
: do concurrent(j
=1:n
)
22 !ERROR: EXIT must not leave a DO CONCURRENT statement
25 end subroutine do_concurrent_test2
27 subroutine do_concurrent_test3(n
)
30 mytest3
: if (n
>0) then
31 mydoc
: do concurrent(j
=1:n
)
33 !ERROR: EXIT must not leave a DO CONCURRENT statement
34 if (j
==10) exit mytest3
38 end subroutine do_concurrent_test3
40 subroutine do_concurrent_test4(n
)
43 mytest4
: if (n
>0) then
44 mydoc
: do concurrent(j
=1:n
)
46 !ERROR: EXIT must not leave a DO CONCURRENT statement
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
54 end subroutine do_concurrent_test4