1 ! RUN: bbc %s -o "-" -emit-fir | FileCheck %s
5 ! CHECK: fir.call @_QPasubroutine()
7 ! CHECK: fir.call @_QPfoo()
23 ! CHECK: fir.call @_QMtestmodPsub()
25 ! CHECK: fir.call @_QMtestmodPfoo()
30 use testMod
, localfoo
=> foo
, localsub
=> sub
32 ! CHECK: fir.call @_QMtestmodPsub()
34 ! CHECK: fir.call @_QMtestmodPfoo()
42 ! CHECK: fir.call @_QFsub3Psub()
44 ! CHECK: fir.call @_QFsub3Pfoo()
56 ! CHECK: fir.call @_QPbar1()
61 ! CHECK: fir.call @_QPbar2()
70 ! CHECK: fir.call @_QPbar3()
76 ! CHECK: fir.call @_QPbar4()
80 module test_bindmodule
82 ! CHECK: func @modulecproc()
83 ! CHECK: func @bind_modulecproc()
84 subroutine modulecproc() bind(c
)
86 subroutine modulecproc_1() bind(c
, name
="bind_modulecproc")
89 ! CHECK-LABEL: func @_QPtest_bindmodule_call() {
90 subroutine test_bindmodule_call
93 subroutine somecproc() bind(c
)
95 subroutine somecproc_1() bind(c
, name
="bind_somecproc")
98 ! CHECK: fir.call @modulecproc()
99 ! CHECK: fir.call @bind_modulecproc()
100 ! CHECK: fir.call @somecproc()
101 ! CHECK: fir.call @bind_somecproc()
108 ! CHECK-LABEL: func @_QPtest_bind_interface() {
109 subroutine test_bind_interface()
111 subroutine some_bindc_iface() bind(C
, name
="some_name_some_foo_does_not_inherit")
114 procedure(some_bindc_iface
) :: foo5
115 ! CHECK: fir.call @foo5