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/] [crayptr2.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
! { dg-options "-fopenmp -fcray-pointer" }
3
! { dg-require-effective-target tls_runtime }
4
 
5
  use omp_lib
6
  integer :: a, b, c, d, p
7
  logical :: l
8
  pointer (ip, p)
9
  save ip
10
!$omp threadprivate (ip)
11
  a = 1
12
  b = 2
13
  c = 3
14
  l = .false.
15
!$omp parallel num_threads (3) reduction (.or.:l)
16
  if (omp_get_thread_num () .eq. 0) then
17
    ip = loc (a)
18
  elseif (omp_get_thread_num () .eq. 1) then
19
    ip = loc (b)
20
  else
21
    ip = loc (c)
22
  end if
23
  l = p .ne. omp_get_thread_num () + 1
24
!$omp single
25
  d = omp_get_thread_num ()
26
!$omp end single copyprivate (d, ip)
27
  l = l .or. (p .ne. d + 1)
28
!$omp end parallel
29
 
30
  if (l) call abort
31
end

powered by: WebSVN 2.1.0

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