xref: /llvm-project/flang/test/Lower/HLFIR/bindc_internal_proc.f90 (revision 06f775a82f6f562f8de75053f62c9c0dbeaa67d2)
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
7subroutine sub1()
8  call foo(42)
9contains
10  subroutine foo(i) bind(c)
11    integer, value :: i
12    print *, i
13  end subroutine
14end subroutine
15
16!CHECK: func.func private @_QFsub2Pfoo(%{{.*}}: i64
17subroutine sub2()
18  call foo(42_8)
19contains
20  subroutine foo(i) bind(c)
21    integer(8), value :: i
22    print *, i
23  end subroutine
24end subroutine
25