2 ! Tests the fix for PR41648 in which the reference a%a%getit () was wrongly
3 ! identified as a recursive call to getit.
5 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
11 procedure, pass(a) :: doit
12 procedure, pass(a) :: getit
22 function getit(a) result(res)
33 type, extends(foo) :: s_bar
34 type(foo), allocatable :: a
36 procedure, pass(a) :: doit
37 procedure, pass(a) :: getit
47 function getit(a) result(res)
51 res = a%a%getit () * 2
57 type, extends(foo) :: a_bar
58 type(foo), allocatable :: a(:)
60 procedure, pass(a) :: doit
61 procedure, pass(a) :: getit
71 function getit(a) result(res)
75 res = a%a(1)%getit () * 3
81 type(foo), target :: b
82 type(s_bar), target :: c
83 type(a_bar), target :: d
84 class(foo), pointer :: a
87 if (a%getit () .ne. 1) call abort
90 if (a%getit () .ne. 2) call abort
93 if (a%getit () .ne. 3) call abort