3 ! PR 43945: [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
5 ! Contributed by by Salvatore Filippone <sfilippone@uniroma2.it>
11 procedure, pass(a) :: doit
12 procedure, pass(a) :: getit
13 generic, public :: do => doit
14 generic, public :: get => getit
21 write(*,*) 'FOO%DOIT base version'
23 function getit(a) result(res)
32 type, extends(foo) :: foo2
35 procedure, pass(a) :: doit => doit2
36 procedure, pass(a) :: getit => getit2
47 function getit2(a) result(res)
57 class(foo), allocatable :: afab
59 allocate(foo2 :: afab)
61 if (af2%i .ne. 2) call abort
62 if (af2%get() .ne. 3) call abort
64 if (afab%i .ne. 2) call abort
65 if (afab%get() .ne. 3) call abort
69 ! { dg-final { cleanup-modules "foo_mod foo2_mod" } }