Fix warnings occured during profiledboostrap on
[official-gcc.git] / gcc / testsuite / gfortran.dg / defined_assignment_6.f90
bloba5666fe5109f2ec17e724679483e24f9ec2a400a
1 ! { dg-do compile }
3 ! PR fortran/57364
5 ! Contributed by Damian Rouson
7 module ref_counter_implementation
8 type ref_counter
9 contains
10 procedure :: assign
11 generic :: assignment(=) => assign
12 end type
13 contains
14 subroutine assign (lhs, rhs)
15 class (ref_counter), intent(inout) :: lhs
16 class (ref_counter), intent(in) :: rhs
17 end subroutine
18 end module
19 module foo_parent_implementation
20 use ref_counter_implementation ,only: ref_counter
21 type :: foo_parent
22 type(ref_counter) :: counter
23 end type
24 contains
25 type(foo_parent) function new_foo_parent()
26 end function
27 end module
28 module foo_implementation
29 use foo_parent_implementation ,only: foo_parent,new_foo_parent
30 type, extends(foo_parent) :: foo
31 end type
32 contains
33 type(foo) function new_foo()
34 new_foo%foo_parent = new_foo_parent()
35 end function
36 end module