2 ! Test the fix for PR43291, which was a regression that caused
3 ! incorrect type mismatch errors at line 46. In the course of
4 ! fixing the PR, it was noted that the dynamic dispatch of the
5 ! final typebound call was not occurring - hence the dg-do run.
7 ! Contributed by Janus Weil <janus@gcc.gnu.org>
15 integer function sizeof(a)
23 type, extends(t1) :: t2
25 procedure :: sizeof => sizeof2
28 integer function sizeof2(a)
37 class(t1), pointer :: a
39 procedure :: sizeof => sizeof3
42 integer function sizeof3(a)
44 sizeof3 = a%a%sizeof()
55 if ((z%sizeof() .ne. 1) .or. (z%a%sizeof() .ne. 1)) call abort
57 if ((z%sizeof() .ne. 2) .or. (z%a%sizeof() .ne. 2)) call abort