URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [pointer1.f90] - Rev 735
Compare with Previous | Blame | View Log
! { dg-do run }integer, pointer :: a, c(:)integer, target :: b, d(10)b = 0a => bd = 0c => dcall foo (a, c)b = 0d = 0call bar (a, c)containssubroutine foo (a, c)integer, pointer :: a, c(:), b, d(:)integer :: r, r2r = 0!$omp parallel firstprivate (a, c) reduction (+:r)!$omp atomica = a + 1!$omp atomicc(1) = c(1) + 1r = r + 1!$omp end parallelif (a.ne.r.or.c(1).ne.r) call abortr2 = rb => ad => cr = 0!$omp parallel firstprivate (b, d) reduction (+:r)!$omp atomicb = b + 1!$omp atomicd(1) = d(1) + 1r = r + 1!$omp end parallelif (b.ne.r+r2.or.d(1).ne.r+r2) call abortend subroutine foosubroutine bar (a, c)integer, pointer :: a, c(:), b, d(:)integer, target :: q, r(5)integer :: iq = 17r = 21b => ad => c!$omp parallel do firstprivate (a, c) lastprivate (a, c)do i = 1, 100!$omp atomica = a + 1!$omp atomicc((i+9)/10) = c((i+9)/10) + 1if (i.eq.100) thena => qc => rend ifend do!$omp end parallel doif (b.ne.100.or.any(d.ne.10)) call abortif (a.ne.17.or.any(c.ne.21)) call aborta => bc => d!$omp parallel do firstprivate (b, d) lastprivate (b, d)do i = 1, 100!$omp atomicb = b + 1!$omp atomicd((i+9)/10) = d((i+9)/10) + 1if (i.eq.100) thenb => qd => rend ifend do!$omp end parallel doif (a.ne.200.or.any(c.ne.20)) call abortif (b.ne.17.or.any(d.ne.21)) call abortend subroutine barend
