brintos

brintos / llvm-project-archived public Read only

0
0
Text · 684 B · 9a0142e Raw
24 lines · plain
1! Test that lowering makes a difference between NAME="" and no NAME2! in BIND(C). See Fortran 2018 standard 18.10.2 point 2.3! BIND(C, NAME="") implies there is no binding label, meaning that4! the Fortran mangled name has to be used.5! RUN: bbc -emit-hlfir %s -o - | FileCheck %s6 7!CHECK: func.func @_QPfoo(%{{.*}}: !fir.ref<i16>8subroutine foo(x) bind(c, name="")9  integer(2) :: x10end subroutine11 12!CHECK: func.func @bar(%{{.*}}: !fir.ref<i32>13subroutine foo(x) bind(c, name="bar")14  integer(4) :: x15end subroutine16 17!CHECK: func.func @_QMinamodule1Pfoo(%{{.*}}: !fir.ref<i64>18module inamodule119contains20subroutine foo(x) bind(c, name="")21  integer(8) :: x22end subroutine23end module24