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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR 42769: [OOP] ICE in resolve_typebound_procedure
4
! comment #27
5
!
6
! Contributed by Janus Weil 
7
 
8
 
9
module mod1
10
  type :: t1
11
  contains
12
    procedure, nopass :: get => my_get
13
  end type
14
contains
15
  integer function my_get()
16
    my_get = 1
17
  end function
18
end module
19
 
20
module mod2
21
contains
22
  integer function my_get()   ! must have the same name as the function in mod1
23
    my_get = 2
24
  end function
25
end module
26
 
27
  use mod2
28
  use mod1              ! order of use statements is important
29
  class(t1),allocatable :: a
30
  allocate(a)
31
  if (a%get()/=1) call abort()
32
end
33
 
34
 
35
! { dg-final { cleanup-modules "mod1 mod2" } }

powered by: WebSVN 2.1.0

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