1! { dg-do compile } 2! Test errors in findloc. 3program main 4 integer, dimension(4) :: a 5 logical, dimension(3) :: msk 6 a = [2,4,6,8] 7 print *,findloc(a) ! { dg-error "Missing actual argument" } 8 print *,findloc(a,value=.true.) ! { dg-error "must be in type conformance to argument" } 9 print *,findloc(a,23,dim=6) ! { dg-error "is not a valid dimension index" } 10 print *,findloc(a,-42,dim=2.0) ! { dg-error "must be INTEGER" } 11 print *,findloc(a,6,msk) ! { dg-error "Different shape for arguments 'array' and 'mask'" } 12 print *,findloc(a,6,kind=98) ! { dg-error "Invalid kind for INTEGER" } 13end program main 14