| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fcoarray=single" } |
| 3 |
! |
| 4 |
! PR fortran/105184 |
| 5 |
! Based on testcases by Gerhard Steinmetz |
| 6 |
|
| 7 |
program p |
| 8 |
real, allocatable :: x[:,:] |
| 9 |
integer :: n = 2 |
| 10 |
allocate (x[ n, *]) |
| 11 |
allocate (x[1:n, *]) |
| 12 |
allocate (x[n:n, *]) |
| 13 |
allocate (x[n, 5:*]) |
| 14 |
allocate (x[ :n, *]) ! { dg-error "Bad coarray specification" } |
| 15 |
allocate (x[::n, *]) ! { dg-error "Bad coarray specification" } |
| 16 |
allocate (x[ :1:1, *]) ! { dg-error "Bad coarray specification" } |
| 17 |
allocate (x[1:n:n, *]) ! { dg-error "Bad coarray specification" } |
| 18 |
allocate (x[1, : *]) ! { dg-error "Missing lower bound" } |
| 19 |
end |