1! { dg-do compile }
2! { dg-options "-fdump-tree-original" }
3!
4! PR fortran/34848
5!
6! This was before giving an ICE; additionally
7! the "0" for the string size of the absent optional
8! argument was missing.
9!
10module krmod
11contains
12 subroutine doit()
13   implicit none
14    real :: doit1(2)
15    doit1 = tm_doit()
16   return
17 end subroutine doit
18 function tm_doit(genloc)
19   implicit none
20   character, optional  :: genloc
21   real :: tm_doit(2)
22   tm_doit = 42.0
23 end function tm_doit
24end module krmod
25
26! { dg-final { scan-tree-dump " tm_doit \\(&parm\.., 0B, 0\\);" "original" } }
27