1 ! RUN: bbc -polymorphic-type -emit-fir %s -o - | FileCheck %s
3 ! Tests the generation of fir.dispatch_table operations.
5 module polymorphic_types
10 procedure
:: proc1
=> proc1_p1
15 type, extends(p1
) :: p2
18 procedure
:: proc1
=> proc1_p2
22 type, extends(p2
) :: p3
30 subroutine proc1_p1(p
)
42 subroutine proc1_p2(p
)
56 ! CHECK-LABEL: fir.dispatch_table @_QMpolymorphic_typesTp1 {
57 ! CHECK: fir.dt_entry "aproc", @_QMpolymorphic_typesPaproc
58 ! CHECK: fir.dt_entry "proc1", @_QMpolymorphic_typesPproc1_p1
59 ! CHECK: fir.dt_entry "zproc", @_QMpolymorphic_typesPzproc
62 ! CHECK-LABEL: fir.dispatch_table @_QMpolymorphic_typesTp2 extends("_QMpolymorphic_typesTp1") {
63 ! CHECK: fir.dt_entry "aproc", @_QMpolymorphic_typesPaproc
64 ! CHECK: fir.dt_entry "proc1", @_QMpolymorphic_typesPproc1_p2
65 ! CHECK: fir.dt_entry "zproc", @_QMpolymorphic_typesPzproc
66 ! CHECK: fir.dt_entry "aproc2", @_QMpolymorphic_typesPaproc2
69 ! CHECK-LABEL: fir.dispatch_table @_QMpolymorphic_typesTp3 extends("_QMpolymorphic_typesTp2") {
70 ! CHECK: fir.dt_entry "aproc", @_QMpolymorphic_typesPaproc
71 ! CHECK: fir.dt_entry "proc1", @_QMpolymorphic_typesPproc1_p2
72 ! CHECK: fir.dt_entry "zproc", @_QMpolymorphic_typesPzproc
73 ! CHECK: fir.dt_entry "aproc2", @_QMpolymorphic_typesPaproc2
74 ! CHECK: fir.dt_entry "aproc3", @_QMpolymorphic_typesPaproc3