1! { dg-do compile }
2!
3! PR 47463: [OOP] ICE in gfc_add_component_ref
4!
5! Contributed by Rich Townsend <townsend@astro.wisc.edu>
6
7module hydro_state
8  type :: state_t
9   contains
10     procedure :: assign
11     generic   :: assignment(=) => assign
12  end type state_t
13contains
14  subroutine assign (this, that)
15    class(state_t), intent(inout) :: this
16    class(state_t), intent(in)    :: that
17  end subroutine assign
18end module hydro_state
19
20module hydro_flow
21  use hydro_state
22  type :: flow_t
23     class(state_t), allocatable :: st
24  end type flow_t
25contains
26  subroutine init_comps (this, st)
27    class(flow_t), intent(out) :: this
28    class(state_t), intent(in) :: st
29
30    allocate(state_t :: this%st)
31    this%st = st
32  end subroutine init_comps
33end module hydro_flow 
34