libgomp/testsuite/libgomp.fortran/pr49792-2.f90
raw| 1 | ! PR fortran/49792 |
| 2 | ! { dg-do run } |
| 3 | ! { dg-options "-std=f2003 -fall-intrinsics" } |
| 4 | |
| 5 | subroutine reverse(n, a) |
| 6 | integer :: n |
| 7 | real(kind=8) :: a(n) |
| 8 | !$omp parallel workshare |
| 9 | a(:) = a(n:1:-1) |
| 10 | !$omp end parallel workshare |
| 11 | end subroutine reverse |
| 12 | |
| 13 | program pr49792 |
| 14 | integer :: b(16) |
| 15 | integer, allocatable :: a(:) |
| 16 | b = 1 |
| 17 | !$omp parallel workshare |
| 18 | a = b |
| 19 | !$omp end parallel workshare |
| 20 | if (size(a).ne.size(b)) stop 1 |
| 21 | if (any (a.ne.b)) stop 2 |
| 22 | end program pr49792 |