5c561fa938
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com> 2017-09-28 Tom de Vries <tom@codesourcery.com> * testsuite/libgomp.c++/for-12.C: Remove superfluous -fopenmp option setting. * testsuite/libgomp.c++/pr69393.C: Same. * testsuite/libgomp.c++/taskloop-1.C: Same. * testsuite/libgomp.c++/taskloop-3.C: Same. * testsuite/libgomp.c++/taskloop-4.C: Same. * testsuite/libgomp.c/for-4.c: Same. * testsuite/libgomp.c/pr66199-3.c: Same. * testsuite/libgomp.c/pr66199-4.c: Same. * testsuite/libgomp.c/pr66199-6.c: Same. * testsuite/libgomp.c/taskloop-1.c: Same. * testsuite/libgomp.c/taskloop-3.c: Same. * testsuite/libgomp.c/taskloop-4.c: Same. * testsuite/libgomp.fortran/aligned1.f03: Same. * testsuite/libgomp.fortran/condinc1.f: Same. * testsuite/libgomp.fortran/condinc3.f90: Same. * testsuite/libgomp.fortran/crayptr1.f90: Same. * testsuite/libgomp.fortran/crayptr2.f90: Same. * testsuite/libgomp.fortran/crayptr3.f90: Same. * testsuite/libgomp.fortran/omp_cond1.f: Same. * testsuite/libgomp.fortran/omp_cond3.F90: Same. * testsuite/libgomp.fortran/pr66199-1.f90: Same. * testsuite/libgomp.fortran/pr66199-2.f90: Same. * testsuite/libgomp.fortran/recursion1.f90: Same. * testsuite/libgomp.fortran/target2.f90: Same. * testsuite/libgomp.fortran/target5.f90: Same. * testsuite/libgomp.fortran/task3.f90: Same. From-SVN: r253250
37 lines
725 B
Fortran
37 lines
725 B
Fortran
! { dg-do run }
|
|
! { dg-options "-fcray-pointer" }
|
|
|
|
use omp_lib
|
|
integer :: a, b, c, i, p
|
|
logical :: l
|
|
pointer (ip, p)
|
|
a = 1
|
|
b = 2
|
|
c = 3
|
|
l = .false.
|
|
ip = loc (a)
|
|
|
|
!$omp parallel num_threads (2) reduction (.or.:l) firstprivate (ip)
|
|
l = p .ne. 1
|
|
ip = loc (b)
|
|
if (omp_get_thread_num () .eq. 1) ip = loc (c)
|
|
l = l .or. (p .ne. (2 + omp_get_thread_num ()))
|
|
!$omp end parallel
|
|
|
|
if (l) call abort
|
|
|
|
l = .false.
|
|
ip = loc (a)
|
|
!$omp parallel do num_threads (2) reduction (.or.:l) &
|
|
!$omp & firstprivate (ip) lastprivate (ip)
|
|
do i = 0, 1
|
|
l = l .or. (p .ne. 1)
|
|
ip = loc (b)
|
|
if (i .eq. 1) ip = loc (c)
|
|
l = l .or. (p .ne. (2 + i))
|
|
end do
|
|
|
|
if (l) call abort
|
|
if (p .ne. 3) call abort
|
|
end
|