bolt/deps/llvm-18.1.8/flang/test/Lower/HLFIR/procedure-designators-arg-attrs.f90
2025-02-14 19:21:04 +01:00

17 lines
485 B
Fortran

! Ensure that func.func arguments are given the Fortran attributes
! even if their first use is in a procedure designator reference
! and not a call.
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
subroutine test(x)
interface
subroutine foo(x)
integer, optional, target :: x
end subroutine
end interface
integer, optional, target :: x
call takes_proc(foo)
call foo(x)
end subroutine
! CHECK: func.func private @_QPfoo(!fir.ref<i32> {fir.optional, fir.target})