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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_minmax.f90] - Diff between revs 303 and 338

Only display areas with differences | Details | Blame | View Log

Rev 303 Rev 338
! Program to test min and max intrinsics
! Program to test min and max intrinsics
program intrinsic_minmax
program intrinsic_minmax
   implicit none
   implicit none
   integer i, j, k, m
   integer i, j, k, m
   real r, s, t, u
   real r, s, t, u
   i = 1
   i = 1
   j = -2
   j = -2
   k = 3
   k = 3
   m = 4
   m = 4
   if (min (i, k) .ne. 1) call abort
   if (min (i, k) .ne. 1) call abort
   if (min (i, j, k, m) .ne. -2) call abort
   if (min (i, j, k, m) .ne. -2) call abort
   if (max (i, k) .ne. 3) call abort
   if (max (i, k) .ne. 3) call abort
   if (max (i, j, k, m) .ne. 4) call abort
   if (max (i, j, k, m) .ne. 4) call abort
   if (max (i+1, j) .ne. 2) call abort
   if (max (i+1, j) .ne. 2) call abort
   r = 1
   r = 1
   s = -2
   s = -2
   t = 3
   t = 3
   u = 4
   u = 4
   if (min (r, t) .ne. 1) call abort
   if (min (r, t) .ne. 1) call abort
   if (min (r, s, t, u) .ne. -2) call abort
   if (min (r, s, t, u) .ne. -2) call abort
   if (max (r, t) .ne. 3) call abort
   if (max (r, t) .ne. 3) call abort
   if (max (r, s, t, u) .ne. 4) call abort
   if (max (r, s, t, u) .ne. 4) call abort
   if (max (4d0, r) .ne. 4d0) call abort
   if (max (4d0, r) .ne. 4d0) call abort
   if (amax0 (i, j) .ne. 1.0) call abort
   if (amax0 (i, j) .ne. 1.0) call abort
   if (min1 (r, s) .ne. -2) call abort
   if (min1 (r, s) .ne. -2) call abort
   ! Test simplify.
   ! Test simplify.
   if (min (1, -2, 3, 4) .ne. -2) call abort
   if (min (1, -2, 3, 4) .ne. -2) call abort
   if (max (1, -2, 3, 4) .ne. 4) call abort
   if (max (1, -2, 3, 4) .ne. 4) call abort
   if (amax0 (1, -2) .ne. 1.0) call abort
   if (amax0 (1, -2) .ne. 1.0) call abort
   if (min1 (1., -2.) .ne. -2) call abort
   if (min1 (1., -2.) .ne. -2) call abort
end program
end program
 
 

powered by: WebSVN 2.1.0

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