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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [forall_1.f90] - Blame information for rev 749

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! tests FORALL statements with a mask
3
dimension i2(15,10), i1(15)
4
type a
5
   sequence
6
   integer k
7
end type a
8
type(a) :: a1(10), a2(5,5)
9
 
10
i1 = (/ 0, 1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 0, 0, 13, 14 /)
11
forall (i=1:15, i1(i) /= 0)
12
   i1(i) = 0
13
end forall
14
if (any(i1 /= 0)) call abort
15
 
16
a1(:)%k = i1(1:10)
17
forall (i=1:10, a1(i)%k == 0)
18
   a1(i)%k = i
19
end forall
20
if (any (a1(:)%k /= (/ (i, i=1,10) /))) call abort
21
 
22
forall (i=1:15, j=1:10, a1(j)%k <= j)
23
   i2(i,j) = j + i*11
24
end forall
25
do i=1,15
26
   if (any (i2(i,:) /= (/ (i*11 + j, j=1,10) /))) call abort
27
end do
28
end

powered by: WebSVN 2.1.0

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