aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_generic_12.f03
blob: 061a41a07f3413b47d22440ed610c2eb2dc718a5 (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
! { dg-do compile }
!
! PR 53328: [OOP] Ambiguous check for type-bound GENERIC shall ignore PASSed arguments
!
! Contributed by Salvatore Filippone <filippone.salvatore@gmail.com>

module m
  type t
  contains
    procedure, pass(this) :: sub1
    procedure, pass(this) :: sub2
    generic :: gen => sub1, sub2   ! { dg-error "are ambiguous" }
  end type t
contains
  subroutine sub1 (x, this)
    integer :: i
    class(t) :: this
  end subroutine sub1

  subroutine sub2 (this, y)
    integer :: i
    class(t) :: this
  end subroutine sub2
end module m 

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