summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/generic_26.f90
blob: a1deef19f99af90a03eb0f8a912b17294fe19bea (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
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
!
! Contributed by <wangmianzhi1@linuxmail.org>

module a

  interface test
    procedure testAlloc
    procedure testPtr   ! { dg-error "Ambiguous interfaces" }
  end interface

contains

  logical function testAlloc(obj)
    integer, allocatable :: obj
    testAlloc = .true.
  end function
  
  logical function testPtr(obj)
    integer, pointer :: obj
    testPtr = .false.
  end function
  
end

! { dg-final { cleanup-modules "a" } }