URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [threadprivate4.f90] - Rev 735
Compare with Previous | Blame | View Log
! { dg-do run }! { dg-require-effective-target tls_runtime }module threadprivate4integer :: viprocedure(), pointer :: foo!$omp threadprivate (foo, vi)containssubroutine fn0vi = 0end subroutine fn0subroutine fn1vi = 1end subroutine fn1subroutine fn2vi = 2end subroutine fn2subroutine fn3vi = 3end subroutine fn3end module threadprivate4use omp_libuse threadprivate4integer :: ilogical :: lprocedure(), pointer :: bar1common /thrc/ bar1!$omp threadprivate (/thrc/)procedure(), pointer, save :: bar2!$omp threadprivate (bar2)l = .false.call omp_set_dynamic (.false.)call omp_set_num_threads (4)!$omp parallel num_threads (4) reduction (.or.:l) private (i)i = omp_get_thread_num ()if (i.eq.0) thenfoo => fn0bar1 => fn0bar2 => fn0elseif (i.eq.1) thenfoo => fn1bar1 => fn1bar2 => fn1elseif (i.eq.2) thenfoo => fn2bar1 => fn2bar2 => fn2elsefoo => fn3bar1 => fn3bar2 => fn3end ifvi = -1!$omp barriervi = -1call foo ()l=l.or.(vi.ne.i)vi = -2call bar1 ()l=l.or.(vi.ne.i)vi = -3call bar2 ()l=l.or.(vi.ne.i)vi = -1!$omp end parallelif (l) call abortend! { dg-final { cleanup-modules "threadprivate4" } }
