aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/generic_33.f90
blob: 540d73b23f056b7d55406bcfd3f8e9929c2205a6 (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
! { dg-do compile }
!
! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

  type :: t
  end type

  interface test
    procedure testAlloc
    procedure testPtr
  end interface

contains

  logical function testAlloc(obj)
    class(t), allocatable :: obj
    testAlloc = .true.
  end function

  logical function testPtr(obj)
    class(t), pointer :: obj
    testPtr = .false.
  end function

end