31 lines · plain
1! Test that parent components are made explicit in reference to2! procedure pointer from parent type.3! RUN: bbc -emit-hlfir -o - %s | FileCheck %s4 5module type_defs6 interface7 subroutine s18 end subroutine9 real function s2()10 end function11 end interface12 type :: t13 procedure(s1), pointer, nopass :: p114 procedure(s2), pointer, nopass :: p215 end type16 type, extends(t) :: t217 end type18end module19 20! CHECK-LABEL: func.func @_QPtest(21subroutine test (x)22use type_defs, only : t223type(t2) :: x24call x%p1()25! CHECK: %[[T_REF1:.*]] = hlfir.designate %{{.*}}{"t"}26! CHECK: hlfir.designate %[[T_REF1]]{"p1"}27print *, x%p2()28! CHECK: %[[T_REF2:.*]] = hlfir.designate %{{.*}}{"t"}29! CHECK: hlfir.designate %[[T_REF2]]{"p2"}30end subroutine31