* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / import6.f90
blobd57a6368b746794943a8685d9adf4749483684a0
1 ! { dg-do compile }
2 ! Tests the fix for PR32827, in which IMPORT :: my_type put the
3 ! symbol into the interface namespace, thereby generating an error
4 ! when the declaration of 'x' is compiled.
6 ! Contributed by Douglas Wells <sysmaint@contek.com>
8 subroutine func1(param)
9 type :: my_type
10 sequence
11 integer :: data
12 end type my_type
13 type(my_type) :: param
14 param%data = 99
15 end subroutine func1
17 subroutine func2(param)
18 type :: my_type
19 sequence
20 integer :: data
21 end type my_type
22 type(my_type) :: param
23 param%data = 21
24 end subroutine func2
26 type :: my_type
27 sequence
28 integer :: data
29 end type my_type
31 interface
32 subroutine func1(param)
33 import :: my_type
34 type(my_type) :: param
35 end subroutine func1
36 end interface
37 interface
38 subroutine func2(param)
39 import
40 type(my_type) :: param
41 end subroutine func2
42 end interface
44 type(my_type) :: x
45 call func1(x)
46 print *, x%data
47 call func2(x)
48 print *, x%data
49 end