annotate gcc/testsuite/gfortran.dg/import5.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! Test for import in interfaces PR fortran/30922
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 module test_import
kono
parents:
diff changeset
7 implicit none
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 type :: my_type
kono
parents:
diff changeset
10 integer :: data
kono
parents:
diff changeset
11 end type my_type
kono
parents:
diff changeset
12 integer, parameter :: n = 20
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 interface
kono
parents:
diff changeset
15 integer function func1(param)
kono
parents:
diff changeset
16 import
kono
parents:
diff changeset
17 type(my_type) :: param(n)
kono
parents:
diff changeset
18 end function func1
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 integer function func2(param)
kono
parents:
diff changeset
21 import :: my_type
kono
parents:
diff changeset
22 type(my_type), value :: param
kono
parents:
diff changeset
23 end function func2
kono
parents:
diff changeset
24 end interface
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 contains
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 subroutine sub1 ()
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 interface
kono
parents:
diff changeset
31 integer function func3(param)
kono
parents:
diff changeset
32 import
kono
parents:
diff changeset
33 type(my_type), dimension (n) :: param
kono
parents:
diff changeset
34 end function func3
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 integer function func4(param)
kono
parents:
diff changeset
37 import :: my_type, n
kono
parents:
diff changeset
38 type(my_type), dimension (n) :: param
kono
parents:
diff changeset
39 end function func4
kono
parents:
diff changeset
40 end interface
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 end subroutine sub1
kono
parents:
diff changeset
43 end module test_import