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/] [retval2.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
! { dg-do run }
2
 
3
function f1 ()
4
  real :: f1
5
  f1 = 6.5
6
  call sub1
7
contains
8
  subroutine sub1
9
    use omp_lib
10
    logical :: l
11
    l = .false.
12
!$omp parallel firstprivate (f1) num_threads (2) reduction (.or.:l)
13
    l = f1 .ne. 6.5
14
    if (omp_get_thread_num () .eq. 0) f1 = 8.5
15
    if (omp_get_thread_num () .eq. 1) f1 = 14.5
16
!$omp barrier
17
    l = l .or. (omp_get_thread_num () .eq. 0 .and. f1 .ne. 8.5)
18
    l = l .or. (omp_get_thread_num () .eq. 1 .and. f1 .ne. 14.5)
19
!$omp end parallel
20
    if (l) call abort
21
    f1 = -2.5
22
  end subroutine sub1
23
end function f1
24
 
25
  real :: f1
26
  if (f1 () .ne. -2.5) call abort
27
end

powered by: WebSVN 2.1.0

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