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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [where18.f90] - Blame information for rev 303

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 303 jeremybenn
! Check to ensure mask is calculated first in WHERE
2
! statements.
3
program where_18
4
   integer :: a(4)
5
   integer :: b(3)
6
   integer :: c(3)
7
   equivalence (a(1), b(1)), (a(2), c(1))
8
 
9
   a = (/1, 1, 1, 1/)
10
   where (b .eq. 1)
11
     c = 2
12
   elsewhere (b .eq. 2)
13
     c = 3
14
   endwhere
15
   if (any (a .ne. (/1, 2, 2, 2/))) &
16
     call abort
17
 
18
   a = (/1, 1, 1, 1/)
19
   where (c .eq. 1)
20
     b = 2
21
   elsewhere (b .eq. 2)
22
     b = 3
23
   endwhere
24
   if (any (a .ne. (/2, 2, 2, 1/))) &
25
     call abort
26
end program

powered by: WebSVN 2.1.0

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