aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/proc_ptr_comp_35.f90
blob: 75a76b8ebbfe7ee8d77bf1f32c23256b08840ce8 (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
! { dg-do compile }
!
! PR 54147: [F03] Interface checks for PPCs & deferred TBPs
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

  interface gen
    procedure gen
  end interface

  type t1
    procedure(gen),pointer,nopass  :: p1
    procedure(gen2),pointer,nopass :: p2  ! { dg-error "may not be generic" }
  end type

  type t2
    procedure(sf),pointer,nopass   :: p3  ! { dg-error "may not be a statement function" }
  end type

  type t3
    procedure(char),pointer,nopass :: p4  ! { dg-error "Intrinsic procedure" }
  end type

  interface gen2
    procedure gen
  end interface

  sf(x) = x**2  ! { dg-warning "Obsolescent feature" }

contains

  subroutine gen
  end subroutine

end