111
|
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
|
|
7 module hydro_grid
|
|
8 type :: grid_t
|
|
9 contains
|
|
10 procedure :: assign
|
|
11 generic :: assignment(=) => assign
|
|
12 end type grid_t
|
|
13 public :: grid_t
|
|
14 contains
|
|
15 subroutine assign (this, that)
|
|
16 class(grid_t), intent(inout) :: this
|
|
17 class(grid_t), intent(in) :: that
|
|
18 end subroutine assign
|
|
19 end module hydro_grid
|
|
20
|
|
21 module hydro_flow
|
|
22 use hydro_grid
|
|
23 type :: flow_t
|
|
24 class(grid_t), allocatable :: gr
|
|
25 end type flow_t
|
|
26 contains
|
|
27 subroutine init_params (this)
|
|
28 class(flow_t), intent(out) :: this
|
|
29 type(grid_t) :: gr
|
|
30 call init_comps(this, gr)
|
|
31 end subroutine init_params
|
|
32 subroutine init_comps (this, gr)
|
|
33 class(flow_t), intent(out) :: this
|
|
34 class(grid_t), intent(in) :: gr
|
|
35 this%gr = gr
|
|
36 end subroutine init_comps
|
|
37 end module hydro_flow
|