1! { dg-do compile }
2
3! PR fortran/37411
4! This used to cause an ICE because of a missing array spec after interface
5! mapping.
6
7! Contributed by Kristjan Jonasson <jonasson@hi.is>
8
9MODULE B1
10CONTAINS
11  subroutine sub()
12    integer :: x(1)
13    character(3) :: st
14    st = fun(x)
15  end subroutine sub
16
17  function fun(x) result(st)
18    integer, intent(in) :: x(1)
19    character(lenf(x)) :: st
20    st = 'abc'
21  end function fun
22
23  pure integer function lenf(x)
24    integer, intent(in) :: x(1)
25    lenf = x(1)
26  end function lenf
27END MODULE B1
28