| 1 |
! { dg-do run } |
| 2 |
! |
| 3 |
! PR fortran/53526 |
| 4 |
! |
| 5 |
! Check handling of move_alloc with coarrays |
| 6 |
! |
| 7 |
implicit none |
| 8 |
integer, allocatable :: u[:], v[:], w(:)[:,:], x(:)[:,:] |
| 9 |
|
| 10 |
allocate (u[4:*]) |
| 11 |
call move_alloc (u, v) |
| 12 |
if (allocated (u)) STOP 1 |
| 13 |
if (lcobound (v, dim=1) /= 4) STOP 2 |
| 14 |
if (ucobound (v, dim=1) /= 3 + num_images()) STOP 3 |
| 15 |
|
| 16 |
allocate (w(-2:3)[4:5,-1:*]) |
| 17 |
call move_alloc (w, x) |
| 18 |
if (allocated (w)) STOP 4 |
| 19 |
if (lbound (x, dim=1) /= -2) STOP 5 |
| 20 |
if (ubound (x, dim=1) /= 3) STOP 6 |
| 21 |
if (any (lcobound (x) /= [4, -1])) STOP 7 |
| 22 |
if (any (ucobound (x) /= [5, -2 + (num_images()+1)/2])) STOP 8 |
| 23 |
|
| 24 |
end |