Debian Codegraph @

flang/test/Lower/HLFIR/bindc_internal_proc.f90

raw
1 ! Test that internal procedure with BIND(C) do not have binding labels,
2 ! that is, that they are generated using usual flang mangling for non BIND(C)
3 ! internal procedures.
4 ! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
5
6 !CHECK: func.func private @_QFsub1Pfoo(%{{.*}}: i32
7 subroutine sub1()
8 call foo(42)
9 contains
10 subroutine foo(i) bind(c)
11 integer, value :: i
12 print *, i
13 end subroutine
14 end subroutine
15
16 !CHECK: func.func private @_QFsub2Pfoo(%{{.*}}: i64
17 subroutine sub2()
18 call foo(42_8)
19 contains
20 subroutine foo(i) bind(c)
21 integer(8), value :: i
22 print *, i
23 end subroutine
24 end subroutine