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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [forall_4.f90] - Blame information for rev 707

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

Line No. Rev Author Line
1 695 jeremybenn
! Program to test nested forall
2
program forall2
3
  implicit none
4
  integer a(4,4,2)
5
  integer i, j, k, n
6
 
7
  a(:,:,1) = reshape((/ 1, 2, 3, 4,&
8
                        5, 6, 7, 8,&
9
                        9,10,11,12,&
10
                       13,14,15,16/), (/4,4/))
11
  a(:,:,2) = a(:,:,1) + 16
12
  n=4
13
  k=1
14
  ! Mirror half the matrix
15
  forall (i=k:n)
16
   forall (j=1:5-i)
17
     a(i,j,:) = a(j,i,:)
18
   end forall
19
  end forall
20
 
21
  if (any (a(:,:,1) &
22
      .ne. reshape((/ 1, 5, 9,13,&
23
                      2, 6,10, 8,&
24
                      3, 7,11,12,&
25
                      4,14,15,16/),(/4,4/)))) call abort
26
  if (any (a(:,:,2) .ne. a(:,:,1) + 16)) call abort
27
end

powered by: WebSVN 2.1.0

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