blob: 590fa5278abf359310828e005a9d3e142df54e61 (
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
|
! { dg-do compile }
!
! PR 49196: [OOP] gfortran compiles invalid generic TBP: dummy arguments are type compatible
!
! Contributed by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
module generic
type :: a_type
contains
procedure :: a_subroutine
end type a_type
type,extends(a_type) :: b_type
contains
procedure :: b_subroutine
generic :: g_sub => a_subroutine,b_subroutine ! { dg-error "are ambiguous" }
end type b_type
contains
subroutine a_subroutine(this)
class(a_type)::this
end subroutine a_subroutine
subroutine b_subroutine(this)
class(b_type)::this
end subroutine b_subroutine
end module generic
! { dg-final { cleanup-modules "generic" } }
|