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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_mmloc_3.f90] - Rev 324

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

! Check we do the right thing with extreme values.
! From PR12704
program intrinsic_mmloc_3
  integer, dimension(2) :: d
  integer, dimension(2,2) :: a
  logical, dimension(2) :: k
  logical, dimension(2,2) :: l

  k = .true.
  l = .true.

  d = -huge (d)
  if (maxloc (d, 1) .ne. 1) call abort ()

  d = huge (d)
  if (minloc (d, 1) .ne. 1) call abort ()

  d = -huge (d)
  if (maxloc (d, 1, k) .ne. 1) call abort ()

  d = huge (d)
  if (minloc (d, 1, k) .ne. 1) call abort ()

  a = -huge (a)
  d = maxloc (a)
  if (any (d .ne. 1)) call abort ()

  a = huge (a)
  d = minloc (a)
  if (any (d .ne. 1)) call abort ()

  a = -huge (a)
  d = maxloc (a, l)
  if (any (d .ne. 1)) call abort ()

  a = huge (a)
  d = minloc (a, l)
  if (any (d .ne. 1)) call abort ()

end program

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

powered by: WebSVN 2.1.0

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