OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [forall.f90] - Diff between revs 303 and 338

Only display areas with differences | Details | Blame | View Log

Rev 303 Rev 338
! Program to test the FORALL construct
! Program to test the FORALL construct
program testforall
program testforall
   implicit none
   implicit none
   integer, dimension (3, 3) :: a
   integer, dimension (3, 3) :: a
   integer, dimension (3) :: b
   integer, dimension (3) :: b
   integer i
   integer i
   a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/));
   a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/));
   forall (i=1:3)
   forall (i=1:3)
      b(i) = sum (a(:, i))
      b(i) = sum (a(:, i))
   end forall
   end forall
   if (b(1) .ne. 6) call abort
   if (b(1) .ne. 6) call abort
   if (b(2) .ne. 15) call abort
   if (b(2) .ne. 15) call abort
   if (b(3) .ne. 24) call abort
   if (b(3) .ne. 24) call abort
end program
end program
 
 

powered by: WebSVN 2.1.0

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