2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr33646.f90
blob3b5662e4ca578f605ba805bfc77f3b0e56f07f99
1 ! { dg-do compile }
2 ! PR fortran/33646
6 module BAR_MODULE
7 implicit none
8 private
9 public create_
10 interface create_
11 module procedure create
12 end interface
13 type system_type
14 integer(kind=kind(1)) :: max_memory_used
15 end type
17 contains
19 subroutine create(self)
20 type(system_type) :: self
21 pointer :: self
22 allocate(self)
23 end subroutine
25 end
27 module FOO_MODULE
28 use BAR_MODULE
29 implicit none
30 private
31 public create_
32 interface create_
33 module procedure create
34 end interface
36 public create_copy_
37 interface create_copy_
38 module procedure create_copy
39 end interface
40 contains
42 subroutine create(self)
43 character(*) :: self
44 pointer :: self
45 nullify(self)
46 allocate(self)
48 self = " "
49 end subroutine
51 subroutine create_copy(self,s)
52 character(*) :: self
53 pointer :: self
54 character(*) :: s
55 call create_(self)
56 end subroutine
57 end