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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 44718: Procedure-pointer name is wrongly regarded as "external procedure"
4
!
5
! Contributed by John McFarland 
6
 
7
MODULE m
8
 
9
 IMPLICIT NONE
10
 
11
CONTAINS
12
 
13
 FUNCTION func(x) RESULT(y)
14
   INTEGER :: x,y
15
   y = x *2
16
 END FUNCTION func
17
 
18
 SUBROUTINE sub(x)
19
   INTEGER :: x
20
   PRINT*, x
21
 END SUBROUTINE sub
22
 
23
 
24
 SUBROUTINE use_func()
25
   PROCEDURE(func), POINTER :: f
26
   INTEGER :: y
27
   f => func
28
   y = f(2)
29
 END SUBROUTINE use_func
30
 
31
 SUBROUTINE use_sub()
32
   PROCEDURE(sub), POINTER :: f
33
   f => sub
34
   CALL f(2)
35
 END SUBROUTINE use_sub
36
 
37
END MODULE m
38
 
39
! { 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.