1! { dg-do compile }
2!
3! PR 49196: [OOP] gfortran compiles invalid generic TBP: dummy arguments are type compatible
4!
5! Contributed by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
6
7module generic
8
9  type :: a_type
10   contains
11     procedure :: a_subroutine
12  end type a_type
13
14  type,extends(a_type) :: b_type
15   contains
16     procedure :: b_subroutine
17     generic :: g_sub => a_subroutine,b_subroutine  ! { dg-error "are ambiguous" }
18  end type b_type
19
20contains
21
22  subroutine a_subroutine(this)
23    class(a_type)::this
24  end subroutine a_subroutine
25
26  subroutine b_subroutine(this)
27    class(b_type)::this
28  end subroutine b_subroutine
29
30end module generic 
31