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