2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / import5.f90
blob0106c4ec121442e4c5992ff24a4c3111c3128a19
1 ! { dg-do compile }
2 ! Test for import in interfaces PR fortran/30922
4 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
6 module test_import
7 implicit none
9 type :: my_type
10 integer :: data
11 end type my_type
12 integer, parameter :: n = 20
14 interface
15 integer function func1(param)
16 import
17 type(my_type) :: param(n)
18 end function func1
20 integer function func2(param)
21 import :: my_type
22 type(my_type), value :: param
23 end function func2
24 end interface
26 contains
28 subroutine sub1 ()
30 interface
31 integer function func3(param)
32 import
33 type(my_type), dimension (n) :: param
34 end function func3
36 integer function func4(param)
37 import :: my_type, n
38 type(my_type), dimension (n) :: param
39 end function func4
40 end interface
42 end subroutine sub1
43 end module test_import
44 ! { dg-final { cleanup-modules "test_import" } }