| 1 |
! |
| 2 |
! { dg-do compile } |
| 3 |
! |
| 4 |
! PR fortran/119836 |
| 5 |
! |
| 6 |
program p |
| 7 |
implicit none |
| 8 |
integer, parameter :: n = 4 |
| 9 |
integer :: i |
| 10 |
integer :: y(n), x(n) |
| 11 |
x = [(i,i=1,n)] |
| 12 |
do concurrent (i=1:n) |
| 13 |
call bar(x, y) ! { dg-error "Subroutine call" } |
| 14 |
end do |
| 15 |
if (any(x /= y)) stop 1 |
| 16 |
x = 2 * x |
| 17 |
do concurrent (i=1:n) |
| 18 |
block |
| 19 |
call bar(x, y) ! { dg-error "Subroutine call" } |
| 20 |
end block |
| 21 |
end do |
| 22 |
if (any(x /= y)) stop 1 |
| 23 |
|
| 24 |
contains |
| 25 |
subroutine bar(x, y) |
| 26 |
integer, intent(in) :: x(:) |
| 27 |
integer, intent(out) :: y(:) |
| 28 |
y = x |
| 29 |
end subroutine |
| 30 |
end program p |