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/] [proc_ptr_comp_19.f90] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
!
3
! PR 41139: [4.5 Regression] a procedure pointer call as actual argument
4
!
5
! Contributed by Janus Weil 
6
 
7
PROGRAM test
8
 
9
 type :: t
10
   PROCEDURE(three), POINTER, nopass :: f
11
 end type
12
 type(t) :: o
13
 logical :: g
14
 
15
 o%f => three
16
 g=greater(4.,o%f())
17
 if (.not. g) call abort()
18
 
19
CONTAINS
20
 
21
 REAL FUNCTION three()
22
   three = 3.
23
 END FUNCTION
24
 
25
 LOGICAL FUNCTION greater(x,y)
26
   REAL, INTENT(in) :: x, y
27
   print *,"greater:",x,y
28
   greater = (x > y)
29
 END FUNCTION greater
30
 
31
END PROGRAM test
32
 

powered by: WebSVN 2.1.0

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