1! { dg-do compile }
2!
3! PR 86116: [6/7/8/9 Regression] Ambiguous generic interface not recognised
4!
5! Contributed by martin <mscfd@gmx.net>
6
7module mod
8
9   type :: t
10   end type t
11
12   interface sub
13      module procedure s1
14      module procedure s2
15   end interface
16
17contains
18
19   subroutine s1(x)  ! { dg-error "Ambiguous interfaces in generic interface" }
20      type(t) :: x
21   end subroutine
22
23   subroutine s2(x)  ! { dg-error "Ambiguous interfaces in generic interface" }
24      class(*), allocatable :: x
25   end subroutine
26
27end
28