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