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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [libgomp/] [testsuite/] [libgomp.fortran/] [nestedfn4.f90] - Diff between revs 273 and 519

Only display areas with differences | Details | Blame | View Log

Rev 273 Rev 519
program foo
program foo
  integer :: i, j, k
  integer :: i, j, k
  integer :: a(10), c(10)
  integer :: a(10), c(10)
  k = 2
  k = 2
  a(:) = 0
  a(:) = 0
  call test1
  call test1
  call test2
  call test2
  do i = 1, 10
  do i = 1, 10
    if (a(i) .ne. 10 * i) call abort
    if (a(i) .ne. 10 * i) call abort
  end do
  end do
  !$omp parallel do reduction (+:c)
  !$omp parallel do reduction (+:c)
  do i = 1, 10
  do i = 1, 10
    c = c + a
    c = c + a
  end do
  end do
  do i = 1, 10
  do i = 1, 10
    if (c(i) .ne. 10 * a(i)) call abort
    if (c(i) .ne. 10 * a(i)) call abort
  end do
  end do
  !$omp parallel do lastprivate (j)
  !$omp parallel do lastprivate (j)
  do j = 1, 10, k
  do j = 1, 10, k
  end do
  end do
  if (j .ne. 11) call abort
  if (j .ne. 11) call abort
contains
contains
  subroutine test1
  subroutine test1
    integer :: i
    integer :: i
    integer :: b(10)
    integer :: b(10)
    do i = 1, 10
    do i = 1, 10
      b(i) = i
      b(i) = i
    end do
    end do
    c(:) = 0
    c(:) = 0
    !$omp parallel do reduction (+:a)
    !$omp parallel do reduction (+:a)
    do i = 1, 10
    do i = 1, 10
      a = a + b
      a = a + b
    end do
    end do
  end subroutine test1
  end subroutine test1
  subroutine test2
  subroutine test2
    !$omp parallel do lastprivate (j)
    !$omp parallel do lastprivate (j)
    do j = 1, 10, k
    do j = 1, 10, k
    end do
    end do
    if (j .ne. 11) call abort
    if (j .ne. 11) call abort
  end subroutine test2
  end subroutine test2
end program foo
end program foo
 
 

powered by: WebSVN 2.1.0

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