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_grid 8 type :: grid_t 9 contains 10 procedure :: assign 11 generic :: assignment(=) => assign 12 end type grid_t 13 public :: grid_t 14contains 15 subroutine assign (this, that) 16 class(grid_t), intent(inout) :: this 17 class(grid_t), intent(in) :: that 18 end subroutine assign 19end module hydro_grid 20 21module hydro_flow 22 use hydro_grid 23 type :: flow_t 24 class(grid_t), allocatable :: gr 25 end type flow_t 26contains 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 37end module hydro_flow 38