OSDN Git Service

2010-04-24 Kai Tietz <kai.tietz@onevision.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / missing_optional_dummy_5.f90
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 !
10 module krmod
11 contains
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
24 end module krmod
25
26 ! { dg-final { scan-tree-dump " tm_doit \\(&parm\.., 0B, 0\\);" "original" } }
27 ! { dg-final { cleanup-tree-dump "original" } }
28 ! { dg-final { cleanup-modules "krmod" } }
29