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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [proc_ptr_comp_24.f90] - Blame information for rev 801

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR42045: [F03] passing a procedure pointer component to a procedure pointer dummy
4
!
5
! Contributed by John McFarland 
6
 
7
PROGRAM prog
8
 TYPE object
9
  PROCEDURE(), POINTER, NOPASS :: f
10
 END TYPE object
11
 TYPE container
12
  TYPE (object), POINTER :: o(:)
13
 END TYPE container
14
 TYPE (container) :: c
15
 TYPE (object) :: o1, o2
16
 PROCEDURE(), POINTER :: f => NULL()
17
 o1%f => f
18
 CALL set_func(o2,f)
19
 CALL set_func(o2,o1%f)
20
 ALLOCATE( c%o(5) )
21
 c%o(5)%f => f
22
 CALL set_func(o2,c%o(5)%f)
23
CONTAINS
24
 SUBROUTINE set_func(o,f)
25
  TYPE (object) :: o
26
  PROCEDURE(), POINTER :: f
27
  o%f => f
28
 END SUBROUTINE set_func
29
END PROGRAM prog

powered by: WebSVN 2.1.0

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