1! { dg-do compile } 2! Test for import in interfaces PR fortran/30922 3! 4! Contributed by Tobias Burnus <burnus@gcc.gnu.org> 5! 6module test_import 7 implicit none 8 9 type :: my_type 10 integer :: data 11 end type my_type 12 integer, parameter :: n = 20 13 14 interface 15 integer function func1(param) 16 import 17 type(my_type) :: param(n) 18 end function func1 19 20 integer function func2(param) 21 import :: my_type 22 type(my_type), value :: param 23 end function func2 24 end interface 25 26contains 27 28 subroutine sub1 () 29 30 interface 31 integer function func3(param) 32 import 33 type(my_type), dimension (n) :: param 34 end function func3 35 36 integer function func4(param) 37 import :: my_type, n 38 type(my_type), dimension (n) :: param 39 end function func4 40 end interface 41 42 end subroutine sub1 43end module test_import 44