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