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.f90] - Blame information for rev 742

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

Line No. Rev Author Line
1 695 jeremybenn
! Program to test the FORALL construct
2
program testforall
3
   implicit none
4
   integer, dimension (3, 3) :: a
5
   integer, dimension (3) :: b
6
   integer i
7
 
8
   a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/));
9
 
10
   forall (i=1:3)
11
      b(i) = sum (a(:, i))
12
   end forall
13
 
14
   if (b(1) .ne. 6) call abort
15
   if (b(2) .ne. 15) call abort
16
   if (b(3) .ne. 24) call abort
17
end program

powered by: WebSVN 2.1.0

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