OSDN Git Service

PR target/35944
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / missing_optional_dummy_4.f90
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 !
9 module krmod
10 contains
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
23 end module krmod
24
25 ! { dg-final { scan-tree-dump " tm_doit \\(0B, 0\\);" "original" } }
26 ! { dg-final { cleanup-tree-dump "original" } }
27 ! { dg-final { cleanup-modules "krmod" } }
28