1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
4 ! it belongs to that construct or an outer construct.
6 subroutine do_concurrent_test1(n
)
10 mydoc
: do concurrent(j
=1:n
)
12 !ERROR: EXIT must not leave a DO CONCURRENT statement
17 end subroutine do_concurrent_test1
19 subroutine do_concurrent_test2(n
)
22 mydoc
: do concurrent(j
=1:n
)
23 !ERROR: EXIT must not leave a DO CONCURRENT statement
26 end subroutine do_concurrent_test2
28 subroutine do_concurrent_test3(n
)
31 mytest3
: if (n
>0) then
32 mydoc
: do concurrent(j
=1:n
)
34 !ERROR: EXIT must not leave a DO CONCURRENT statement
35 if (j
==10) exit mytest3
39 end subroutine do_concurrent_test3
41 subroutine do_concurrent_test4(n
)
44 mytest4
: if (n
>0) then
45 mydoc
: do concurrent(j
=1:n
)
47 !ERROR: EXIT must not leave a DO CONCURRENT statement
49 !ERROR: EXIT must not leave a DO CONCURRENT statement
50 !ERROR: EXIT must not leave a DO CONCURRENT statement
51 if (j
==10) exit mytest4
55 end subroutine do_concurrent_test4