OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_assignment_1.f03] - Blame information for rev 700

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 47463: [OOP] ICE in gfc_add_component_ref
4
!
5
! Contributed by Rich Townsend 
6
 
7
module hydro_state
8
  type :: state_t
9
   contains
10
     procedure :: assign
11
     generic   :: assignment(=) => assign
12
  end type state_t
13
contains
14
  subroutine assign (this, that)
15
    class(state_t), intent(inout) :: this
16
    class(state_t), intent(in)    :: that
17
  end subroutine assign
18
end module hydro_state
19
 
20
module hydro_flow
21
  use hydro_state
22
  type :: flow_t
23
     class(state_t), allocatable :: st
24
  end type flow_t
25
contains
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
33
end module hydro_flow
34
 
35
! { dg-final { cleanup-modules "hydro_state hydro_flow" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.