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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR 45290: [F08] pointer initialization
4
!
5
! Contributed by Janus Weil 
6
 
7
module m
8
 
9
implicit none
10
 
11
contains
12
 
13
  integer function f1()
14
    f1 = 42
15
  end function
16
 
17
  integer function f2()
18
    f2 = 43
19
  end function
20
 
21
end module
22
 
23
 
24
program test_ptr_init
25
 
26
use m
27
implicit none
28
 
29
procedure(f1), pointer :: pp => f1
30
 
31
type :: t
32
  procedure(f2), pointer, nopass :: ppc => f2
33
end type
34
 
35
type (t) :: u
36
 
37
if (pp()/=42) call abort()
38
if (u%ppc()/=43) call abort()
39
 
40
end
41
 
42
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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