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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [libgomp/] [testsuite/] [libgomp.fortran/] [nestedfn1.f90] - Blame information for rev 867

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

Line No. Rev Author Line
1 38 julius
! { dg-do run }
2
 
3
  integer :: a, b, c
4
  a = 1
5
  b = 2
6
  c = 3
7
  call foo
8
  if (a .ne. 7) call abort
9
contains
10
  subroutine foo
11
    use omp_lib
12
    logical :: l
13
    l = .false.
14
!$omp parallel shared (a) private (b) firstprivate (c) &
15
!$omp num_threads (2) reduction (.or.:l)
16
    if (a .ne. 1 .or. c .ne. 3) l = .true.
17
!$omp barrier
18
    if (omp_get_thread_num () .eq. 0) then
19
      a = 4
20
      b = 5
21
      c = 6
22
    end if
23
!$omp barrier
24
    if (omp_get_thread_num () .eq. 1) then
25
      if (a .ne. 4 .or. c .ne. 3) l = .true.
26
      a = 7
27
      b = 8
28
      c = 9
29
    else if (omp_get_num_threads () .eq. 1) then
30
      a = 7
31
    end if
32
!$omp barrier
33
    if (omp_get_thread_num () .eq. 0) then
34
      if (a .ne. 7 .or. b .ne. 5 .or. c .ne. 6) l = .true.
35
    end if
36
!$omp barrier
37
    if (omp_get_thread_num () .eq. 1) then
38
      if (a .ne. 7 .or. b .ne. 8 .or. c .ne. 9) l = .true.
39
    end if
40
!$omp end parallel
41
    if (l) call abort
42
  end subroutine foo
43
end

powered by: WebSVN 2.1.0

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