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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [minmaxloc_7.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! Contributed by Tobias Burnus 
2
! { dg-do run }
3
program test
4
  implicit none
5
  real, volatile, allocatable :: A(:)
6
  logical, volatile :: mask(11)
7
 
8
  A = [1,2,3,5,6,1,35,3,7,-3,-47]
9
  mask = .true.
10
  mask(7) = .false.
11
  mask(11) = .false.
12
  call sub2 (minloc(A),11)
13
  call sub2 (maxloc(A, mask=mask),9)
14
  A = minloc(A)
15
  if (size (A) /= 1 .or. A(1) /= 11) call abort ()
16
contains
17
  subroutine sub2(A,n)
18
    integer :: A(:),n
19
    if (A(1) /= n .or. size (A) /= 1) call abort ()
20
  end subroutine sub2
21
end program test

powered by: WebSVN 2.1.0

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