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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.fortran/] [collapse2.f90] - Blame information for rev 841

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

Line No. Rev Author Line
1 273 jeremybenn
! { dg-do run }
2
 
3
program collapse2
4
  call test1
5
  call test2
6
contains
7
  subroutine test1
8
    integer :: i, j, k, a(1:3, 4:6, 5:7)
9
    logical :: l
10
    l = .false.
11
    a(:, :, :) = 0
12
    !$omp parallel do collapse(4 - 1) schedule(static, 4)
13
      do 164 i = 1, 3
14
        do 164 j = 4, 6
15
          do 164 k = 5, 7
16
            a(i, j, k) = i + j + k
17
164      end do
18
    !$omp parallel do collapse(2) reduction(.or.:l)
19
firstdo: do i = 1, 3
20
        do j = 4, 6
21
          do k = 5, 7
22
            if (a(i, j, k) .ne. (i + j + k)) l = .true.
23
          end do
24
        end do
25
      end do firstdo
26
    !$omp end parallel do
27
    if (l) call abort
28
  end subroutine test1
29
 
30
  subroutine test2
31
    integer :: a(3,3,3), k, kk, kkk, l, ll, lll
32
    !$omp do collapse(3)
33
      do 115 k=1,3
34
  dokk: do kk=1,3
35
          do kkk=1,3
36
            a(k,kk,kkk) = 1
37
          enddo
38
        enddo dokk
39
115   continue
40
    if (any(a(1:3,1:3,1:3).ne.1)) call abort
41
 
42
    !$omp do collapse(3)
43
 dol: do 120 l=1,3
44
  doll: do ll=1,3
45
          do lll=1,3
46
            a(l,ll,lll) = 2
47
          enddo
48
        enddo doll
49
120   end do dol
50
    if (any(a(1:3,1:3,1:3).ne.2)) call abort
51
  end subroutine test2
52
 
53
end program collapse2

powered by: WebSVN 2.1.0

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