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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [workshare1.f90] - Blame information for rev 741

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 735 jeremybenn
function foo ()
2
  integer :: foo
3
  logical :: foo_seen
4
  common /foo_seen/ foo_seen
5
  foo_seen = .true.
6
  foo = 3
7
end
8
function bar ()
9
  integer :: bar
10
  logical :: bar_seen
11
  common /bar_seen/ bar_seen
12
  bar_seen = .true.
13
  bar = 3
14
end
15
  integer :: a (10), b (10), foo, bar
16
  logical :: foo_seen, bar_seen
17
  common /foo_seen/ foo_seen
18
  common /bar_seen/ bar_seen
19
 
20
  foo_seen = .false.
21
  bar_seen = .false.
22
!$omp parallel workshare if (foo () .gt. 2) num_threads (bar () + 1)
23
  a = 10
24
  b = 20
25
  a(1:5) = max (a(1:5), b(1:5))
26
!$omp end parallel workshare
27
  if (any (a(1:5) .ne. 20)) call abort
28
  if (any (a(6:10) .ne. 10)) call abort
29
  if (.not. foo_seen .or. .not. bar_seen) call abort
30
end

powered by: WebSVN 2.1.0

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