OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [libgomp/] [testsuite/] [libgomp.fortran/] [reduction5.f90] - Diff between revs 273 and 338

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

Rev 273 Rev 338
! { dg-do run }
! { dg-do run }
module reduction5
module reduction5
  intrinsic ior, min, max
  intrinsic ior, min, max
end module reduction5
end module reduction5
  call test1
  call test1
  call test2
  call test2
contains
contains
  subroutine test1
  subroutine test1
    use reduction5, bitwise_or => ior
    use reduction5, bitwise_or => ior
    integer :: n
    integer :: n
    n = Z'f'
    n = Z'f'
!$omp parallel sections num_threads (3) reduction (bitwise_or: n)
!$omp parallel sections num_threads (3) reduction (bitwise_or: n)
    n = ior (n, Z'20')
    n = ior (n, Z'20')
!$omp section
!$omp section
    n = bitwise_or (Z'410', n)
    n = bitwise_or (Z'410', n)
!$omp section
!$omp section
    n = bitwise_or (n, Z'2000')
    n = bitwise_or (n, Z'2000')
!$omp end parallel sections
!$omp end parallel sections
    if (n .ne. Z'243f') call abort
    if (n .ne. Z'243f') call abort
  end subroutine
  end subroutine
  subroutine test2
  subroutine test2
    use reduction5, min => max, max => min
    use reduction5, min => max, max => min
    integer :: m, n
    integer :: m, n
    m = 8
    m = 8
    n = 4
    n = 4
!$omp parallel sections num_threads (3) reduction (min: n) &
!$omp parallel sections num_threads (3) reduction (min: n) &
!$omp & reduction (max: m)
!$omp & reduction (max: m)
    if (m .gt. 13) m = 13
    if (m .gt. 13) m = 13
    if (n .lt. 11) n = 11
    if (n .lt. 11) n = 11
!$omp section
!$omp section
    if (m .gt. 5) m = 5
    if (m .gt. 5) m = 5
    if (n .lt. 15) n = 15
    if (n .lt. 15) n = 15
!$omp section
!$omp section
    if (m .gt. 3) m = 3
    if (m .gt. 3) m = 3
    if (n .lt. -1) n = -1
    if (n .lt. -1) n = -1
!$omp end parallel sections
!$omp end parallel sections
    if (m .ne. 3 .or. n .ne. 15) call abort
    if (m .ne. 3 .or. n .ne. 15) call abort
  end subroutine test2
  end subroutine test2
end
end
! { dg-final { cleanup-modules "reduction5" } }
! { dg-final { cleanup-modules "reduction5" } }
 
 

powered by: WebSVN 2.1.0

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