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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [where_16.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! Check whether nested WHEREs work
2
program where_16
3
   integer :: a(9)
4
   integer :: b(9)
5
   integer :: c(9)
6
 
7
   a = (/0, 0, 0, 1, 1, 1, 2, 2, 2/)
8
   b = (/0, 1, 2, 0, 1, 2, 0, 1, 2/)
9
   c = (/0, 0, 0, 0, 0, 0, 0, 0, 0/)
10
 
11
   where (a .eq. 0)
12
     where (b .eq. 0)
13
       c = 1
14
     else where (b .eq. 1)
15
       c = 2
16
     else where
17
       c = 3
18
     endwhere
19
   elsewhere (a .eq. 1)
20
     where (b .eq. 0)
21
       c = 4
22
     else where (b .eq. 1)
23
       c = 5
24
     else where
25
       c = 6
26
     endwhere
27
   elsewhere
28
     where (b .eq. 0)
29
       c = 7
30
     else where (b .eq. 1)
31
       c = 8
32
     else where
33
       c = 9
34
     endwhere
35
   endwhere
36
   if (any (c .ne. (/1, 2, 3, 4, 5, 6, 7, 8, 9/))) &
37
     call abort
38
end program
39
 

powered by: WebSVN 2.1.0

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