| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fopenmp -fcray-pointer" } |
| 3 |
! |
| 4 |
! PR fortran/43985 |
| 5 |
|
| 6 |
subroutine pete(A) |
| 7 |
real(8) :: A |
| 8 |
print *, 'pete got ',A |
| 9 |
if (A /= 3.0) STOP 1 |
| 10 |
end subroutine pete |
| 11 |
|
| 12 |
subroutine bob() |
| 13 |
implicit none |
| 14 |
real(8) peted |
| 15 |
pointer (ipeted, peted(*)) |
| 16 |
integer(4) sz |
| 17 |
ipeted = malloc(5*8) |
| 18 |
peted(1:5) = [ 1.,2.,3.,4.,5.] |
| 19 |
sz = 3 |
| 20 |
!$omp parallel default(shared) |
| 21 |
call pete(peted(sz)) |
| 22 |
!$omp end parallel |
| 23 |
return |
| 24 |
end subroutine bob |
| 25 |
|
| 26 |
call bob() |
| 27 |
end |