OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_call_10.f03] - Blame information for rev 302

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
!
3
! PR 39630: [F03] Procedure Pointer Components with PASS
4
!
5
! Contributed by Tobias Burnus 
6
 
7
module m
8
 
9
 type :: t
10
  integer :: i
11
 contains
12
  procedure, pass(y) :: foo
13
 end type t
14
 
15
contains
16
 
17
 subroutine foo(x,y)
18
  type(t),optional :: x
19
  class(t) :: y
20
  if(present(x)) then
21
    print *, 'foo', x%i, y%i
22
  else
23
    print *, 'foo', y%i
24
  end if
25
 end subroutine foo
26
 
27
end module m
28
 
29
use m
30
type(t) :: t1, t2
31
t1%i = 3
32
t2%i = 4
33
call t1%foo()
34
call t2%foo()
35
call t1%foo(t2)
36
end
37
 
38
! { dg-final { cleanup-modules "m" } }
39
 

powered by: WebSVN 2.1.0

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