2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / typebound_generic_13.f03
blobc2116e965a8cb392d462d680c38a8633b982d7ea
1 ! { dg-do compile }
3 ! PR 47710: [OOP] Improve ambiguity check for GENERIC TBP w/ PASS and NOPASS
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 module m
9   type base_t
10   contains
11     procedure, nopass :: baseproc_nopass => baseproc1
12     procedure, pass   :: baseproc_pass => baseproc2
13     generic           :: some_proc => baseproc_pass, baseproc_nopass   ! { dg-error "are ambiguous" }
14   end type
16 contains
18   subroutine baseproc1 (this)
19     class(base_t) :: this
20   end subroutine
22   subroutine baseproc2 (this, that)
23     class(base_t) :: this, that
24   end subroutine
26 end module
28 ! { dg-final { cleanup-modules "m" } }