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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_anyall.f90] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 303 jeremybenn
! Program to test the ANY and ALL intrinsics
2
program anyall
3
   implicit none
4
   logical, dimension(3, 3) :: a
5
   logical, dimension(3) :: b
6
   character(len=10) line
7
 
8
   a = .false.
9
   if (any(a)) call abort
10
   a(1, 1) = .true.
11
   a(2, 3) = .true.
12
   if (.not. any(a)) call abort
13
   b = any(a, 1)
14
   if (.not. b(1)) call abort
15
   if (b(2)) call abort
16
   if (.not. b(3)) call abort
17
   b = .false.
18
   write (line, 9000) any(a,1)
19
   read (line, 9000) b
20
   if (.not. b(1)) call abort
21
   if (b(2)) call abort
22
   if (.not. b(3)) call abort
23
 
24
   a = .true.
25
   if (.not. all(a)) call abort
26
   a(1, 1) = .false.
27
   a(2, 3) = .false.
28
   if (all(a)) call abort
29
   b = all(a, 1)
30
   if (b(1)) call abort
31
   if (.not. b(2)) call abort
32
   if (b(3)) call abort
33
   b = .false.
34
   write (line, 9000) all(a,1)
35
   read (line, 9000) b
36
   if (b(1)) call abort
37
   if (.not. b(2)) call abort
38
   if (b(3)) call abort
39
 
40
9000 format (9L1)
41
end program

powered by: WebSVN 2.1.0

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