aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/generic_34.f90
blob: 1bcbfa089fa74012f6e4b7051c86383c031806d7 (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
! { dg-do compile }
!
! PR 86116: [6/7/8/9 Regression] Ambiguous generic interface not recognised
!
! Contributed by martin <mscfd@gmx.net>

module mod

   type :: t
   end type t

   interface sub
      module procedure s1
      module procedure s2
   end interface

contains

   subroutine s1(x)  ! { dg-error "Ambiguous interfaces in generic interface" }
      type(t) :: x
   end subroutine

   subroutine s2(x)  ! { dg-error "Ambiguous interfaces in generic interface" }
      class(*), allocatable :: x
   end subroutine

end