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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [reference1.f90] - Blame information for rev 791

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

Line No. Rev Author Line
1 735 jeremybenn
! { dg-do run }
2
!$ use omp_lib
3
 
4
  integer :: i, j, k
5
  double precision :: d
6
  i = 6
7
  j = 19
8
  k = 0
9
  d = 24.5
10
  call test (i, j, k, d)
11
  if (i .ne. 38) call abort
12
  if (iand (k, 255) .ne. 0) call abort
13
  if (iand (k, 65280) .eq. 0) then
14
    if (k .ne. 65536 * 4) call abort
15
  end if
16
contains
17
  subroutine test (i, j, k, d)
18
    integer :: i, j, k
19
    double precision :: d
20
 
21
!$omp parallel firstprivate (d) private (j) num_threads (4) reduction (+:k)
22
    if (i .ne. 6 .or. d .ne. 24.5 .or. k .ne. 0) k = k + 1
23
    if (omp_get_num_threads () .ne. 4) k = k + 256
24
    d = d / 2
25
    j = 8
26
    k = k + 65536
27
!$omp barrier
28
    if (d .ne. 12.25 .or. j .ne. 8) k = k + 1
29
!$omp single
30
    i = i + 32
31
!$omp end single nowait
32
!$omp end parallel
33
  end subroutine test
34
end

powered by: WebSVN 2.1.0

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