2 ! { dg-options "-fcoarray=single" }
11 outer
: do, concurrent ( i
= 1 : 4)
13 if (j
== 1) cycle
! OK
14 cycle outer
! OK: C821 FIXME
15 exit outer
! { dg-error "EXIT statement at .1. leaves DO CONCURRENT construct" }
19 do concurrent (j
= 1:5)
24 do concurrent (j
=1:5:2) ! cycle outer2 - bad: C821
25 cycle outer2
! { dg-error "leaves DO CONCURRENT construct" }
29 do concurrent ( i
= 1 : 4)
30 exit
! { dg-error "EXIT statement at .1. leaves DO CONCURRENT construct" }
35 do concurrent ( i
= 1 : 4)
36 return ! { dg-error "Image control statement RETURN" }
37 sync all
! { dg-error "Image control statement SYNC" }
38 call test () ! { dg-error "Subroutine call to .test. in DO CONCURRENT block at .1. is not PURE" }
39 stop ! { dg-error "Image control statement STOP" }
41 do concurrent ( i
= 1 : 4)
42 critical
! { dg-error "Image control statement CRITICAL at .1. in DO CONCURRENT block" }
48 do concurrent ( i
= 1 : 4) ! OK
56 type(lock_type
), allocatable
:: lock
[:]
58 do, concurrent (i
= 1:3)
59 allocate (lock
[*]) ! { dg-error "ALLOCATE of coarray at .1. in DO CONCURRENT block" }
60 lock(lock
) ! { dg-error "Image control statement LOCK" }
61 unlock(lock
) ! { dg-error "Image control statement UNLOCK" }
62 deallocate (lock
) ! { dg-error "DEALLOCATE of coarray at .1. in DO CONCURRENT block" }
66 allocate (lock
[*]) ! { dg-error "ALLOCATE of coarray at .1. in CRITICAL block" }
67 lock(lock
) ! { dg-error "Image control statement LOCK" }
68 unlock(lock
) ! { dg-error "Image control statement UNLOCK" }
69 deallocate (lock
) ! { dg-error "DEALLOCATE of coarray at .1. in CRITICAL block" }