diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.fortran/pr49792-1.f90')
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/pr49792-1.f90 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/pr49792-1.f90 b/libgomp/testsuite/libgomp.fortran/pr49792-1.f90 new file mode 100644 index 000000000..cf2bb66fc --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/pr49792-1.f90 @@ -0,0 +1,18 @@ +! PR fortran/49792 +! { dg-do run } + +subroutine reverse(n, a) + integer :: n + real(kind=8) :: a(n) +!$omp parallel workshare + a(:) = a(n:1:-1) +!$omp end parallel workshare +end subroutine reverse + +program pr49792 + real(kind=8) :: a(16) = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] + real(kind=8) :: b(16) + b(:) = a(16:1:-1) + call reverse (16,a) + if (any (a.ne.b)) call abort +end program pr49792 |