aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/minmaxloc_9.f90
blob: badadac625c69a76488080c5a25f47e965f05f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do compile }
! Check for a few restrictions on the back argument to
! minloc and maxloc.
program main
  integer, dimension(3) :: a
  a = [1,2,3]
  print *,minloc(a,back=42) ! { dg-error "must be LOGICAL" }
  print *,minloc(a,back=[.true.,.false.]) ! { dg-error "must be a scalar" }
  print *,maxloc(a,back=42) ! { dg-error "must be LOGICAL" }
  print *,maxloc(a,back=[.true.,.false.]) ! { dg-error "must be a scalar" }
end program main