OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.fortran/] [task1.f90] - Blame information for rev 280

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 273 jeremybenn
! { dg-do run }
2
 
3
program tasktest
4
  use omp_lib
5
  integer :: i, j
6
  common /tasktest_j/ j
7
  j = 0
8
  !$omp parallel private (i)
9
    i = omp_get_thread_num ()
10
    if (i.lt.2) then
11
      !$omp task if (.false.) default(firstprivate)
12
        call subr (i + 1)
13
      !$omp end task
14
    end if
15
  !$omp end parallel
16
  if (j.gt.0) call abort
17
contains
18
  subroutine subr (i)
19
    use omp_lib
20
    integer :: i, j
21
    common /tasktest_j/ j
22
    if (omp_get_thread_num ().ne.(i - 1)) then
23
    !$omp atomic
24
      j = j + 1
25
    end if
26
  end subroutine subr
27
end program tasktest

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.