summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_4.f90
blob: 60b9e73af8283eb4abc0d0bd24669417612783a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
! { dg-do compile }
!
! PROCEDURE POINTERS & pointer-valued functions
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

interface
  integer function f1()
  end function
end interface

interface
 function f2()
   integer, pointer :: f2
 end function
end interface

interface
 function pp1()
   integer :: pp1
 end function
end interface
pointer :: pp1

pointer :: pp2
interface
  function pp2()
    integer :: pp2
  end function
end interface

pointer :: pp3
interface
  function pp3()
    integer, pointer :: pp3
  end function
end interface

interface
  function pp4()
    integer, pointer :: pp4
  end function
end interface
pointer :: pp4


pp1 => f1

pp2 => pp1

f2 => f1	! { dg-error "is not a variable" }

pp3 => f2

pp4 => pp3

end