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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_count.f90] - Blame information for rev 695

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! Program to test the COUNT intrinsic
2
program intrinsic_count
3
   implicit none
4
   logical(kind=4), dimension (3, 5) :: a
5
   integer(kind=4), dimension (3) :: b
6
   integer i
7
   character(len=10) line
8
 
9
   a = .false.
10
   if (count(a) .ne. 0) call abort
11
   a = .true.
12
   if (count(a) .ne. 15) call abort
13
   a(1, 1) = .false.
14
   a(2, 2) = .false.
15
   a(2, 5) = .false.
16
   if (count(a) .ne. 12) call abort
17
   write (line, 9000) count(a)
18
   read (line, 9000) i
19
   if (i .ne. 12) call abort
20
 
21
   b(1:3) = count(a, 2);
22
   if (b(1) .ne. 4) call abort
23
   if (b(2) .ne. 3) call abort
24
   if (b(3) .ne. 5) call abort
25
   b = 0
26
   write (line, 9000) count(a,2)
27
   read (line, 9000) b
28
   if (b(1) .ne. 4) call abort
29
   if (b(2) .ne. 3) call abort
30
   if (b(3) .ne. 5) call abort
31
 
32
9000 format(3I3)
33
 
34
end program

powered by: WebSVN 2.1.0

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