1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
! { dg-do compile }
! PR fortran/91649
! Code originally contributed by Gerhard Steinmetz
subroutine p
logical :: back = .true.
integer :: x(1) = findloc([1, 2, 1], '1', back=back) ! { dg-error "must be in type conformance" }
print *, x
end
subroutine q
type t
end type
logical :: back = .false.
integer :: x(1) = findloc([1, 2, 1], t(), back=back) ! { dg-error "must be of intrinsic type" }
print *, x
end
subroutine s
character(4) :: c = '1234'
integer :: x(1) = findloc([1, 2, 1], c, back=.true.) ! { dg-error "must be in type conformance" }
print *, x
end
|