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_minmax.f90] - Blame information for rev 698

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

Line No. Rev Author Line
1 695 jeremybenn
! Program to test min and max intrinsics
2
program intrinsic_minmax
3
   implicit none
4
   integer i, j, k, m
5
   real r, s, t, u
6
 
7
   i = 1
8
   j = -2
9
   k = 3
10
   m = 4
11
   if (min (i, k) .ne. 1) call abort
12
   if (min (i, j, k, m) .ne. -2) call abort
13
   if (max (i, k) .ne. 3) call abort
14
   if (max (i, j, k, m) .ne. 4) call abort
15
   if (max (i+1, j) .ne. 2) call abort
16
 
17
   r = 1
18
   s = -2
19
   t = 3
20
   u = 4
21
   if (min (r, t) .ne. 1) call abort
22
   if (min (r, s, t, u) .ne. -2) call abort
23
   if (max (r, t) .ne. 3) call abort
24
   if (max (r, s, t, u) .ne. 4) call abort
25
 
26
   if (max (4d0, r) .ne. 4d0) call abort
27
   if (amax0 (i, j) .ne. 1.0) call abort
28
   if (min1 (r, s) .ne. -2) call abort
29
 
30
   ! Test simplify.
31
   if (min (1, -2, 3, 4) .ne. -2) call abort
32
   if (max (1, -2, 3, 4) .ne. 4) call abort
33
   if (amax0 (1, -2) .ne. 1.0) call abort
34
   if (min1 (1., -2.) .ne. -2) call abort
35
 
36
end program
37
 

powered by: WebSVN 2.1.0

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