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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 735 jeremybenn
! { dg-do run }
2
! { dg-require-effective-target tls_runtime }
3
!$ use omp_lib
4
 
5
  integer, save, allocatable :: a(:, :)
6
  integer, allocatable :: b(:, :)
7
  integer :: n
8
  logical :: l
9
!$omp threadprivate (a)
10
  if (allocated (a)) call abort
11
  call omp_set_dynamic (.false.)
12
  l = .false.
13
!$omp parallel num_threads (4) reduction(.or.:l)
14
  allocate (a(-1:1, 7:10))
15
  a(:, :) = omp_get_thread_num () + 6
16
  l = l.or..not.allocated (a)
17
  l = l.or.size(a).ne.12.or.size(a,1).ne.3.or.size(a,2).ne.4
18
!$omp end parallel
19
  if (l.or.any(a.ne.6)) call abort ()
20
!$omp parallel num_threads (4) copyin (a) reduction(.or.:l) private (b)
21
  l = l.or.allocated (b)
22
  l = l.or..not.allocated (a)
23
  l = l.or.size(a).ne.12.or.size(a,1).ne.3.or.size(a,2).ne.4
24
  l = l.or.any(a.ne.6)
25
  allocate (b(1, 3))
26
  a(:, :) = omp_get_thread_num () + 36
27
  b(:, :) = omp_get_thread_num () + 66
28
  !$omp single
29
    n = omp_get_thread_num ()
30
  !$omp end single copyprivate (a, b)
31
  l = l.or..not.allocated (a)
32
  l = l.or.size(a).ne.12.or.size(a,1).ne.3.or.size(a,2).ne.4
33
  l = l.or.any(a.ne.(n + 36))
34
  l = l.or..not.allocated (b)
35
  l = l.or.size(b).ne.3.or.size(b,1).ne.1.or.size(b,2).ne.3
36
  l = l.or.any(b.ne.(n + 66))
37
  deallocate (b)
38
  l = l.or.allocated (b)
39
!$omp end parallel
40
  if (n.lt.0 .or. n.ge.4) call abort
41
  if (l.or.any(a.ne.(n + 36))) call abort
42
!$omp parallel num_threads (4) reduction(.or.:l)
43
  deallocate (a)
44
  l = l.or.allocated (a)
45
!$omp end parallel
46
  if (l.or.allocated (a)) call abort
47
end

powered by: WebSVN 2.1.0

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