aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_proc_26.f90
blob: 0c4264ed131b67a1fa8e6e42a3514d8a95f4cc41 (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
! { 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, abstract :: t1
  contains
    procedure(gen),deferred,nopass  :: p1
    procedure(gen2),deferred,nopass :: p2  ! { dg-error "may not be generic" }
  end type

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

  type, abstract :: t3
  contains
    procedure(char),deferred,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