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/] [nestedfn4.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
program foo
2
  integer :: i, j, k
3
  integer :: a(10), c(10)
4
  k = 2
5
  a(:) = 0
6
  call test1
7
  call test2
8
  do i = 1, 10
9
    if (a(i) .ne. 10 * i) call abort
10
  end do
11
  !$omp parallel do reduction (+:c)
12
  do i = 1, 10
13
    c = c + a
14
  end do
15
  do i = 1, 10
16
    if (c(i) .ne. 10 * a(i)) call abort
17
  end do
18
  !$omp parallel do lastprivate (j)
19
  do j = 1, 10, k
20
  end do
21
  if (j .ne. 11) call abort
22
contains
23
  subroutine test1
24
    integer :: i
25
    integer :: b(10)
26
    do i = 1, 10
27
      b(i) = i
28
    end do
29
    c(:) = 0
30
    !$omp parallel do reduction (+:a)
31
    do i = 1, 10
32
      a = a + b
33
    end do
34
  end subroutine test1
35
  subroutine test2
36
    !$omp parallel do lastprivate (j)
37
    do j = 1, 10, k
38
    end do
39
    if (j .ne. 11) call abort
40
  end subroutine test2
41
end program foo

powered by: WebSVN 2.1.0

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