Debian Codegraph @

flang/test/Lower/HLFIR/procedure-designators-arg-attrs.f90

raw
1 ! Ensure that func.func arguments are given the Fortran attributes
2 ! even if their first use is in a procedure designator reference
3 ! and not a call.
4
5 ! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
6
7 subroutine test(x)
8 interface
9 subroutine foo(x)
10 integer, optional, target :: x
11 end subroutine
12 end interface
13 integer, optional, target :: x
14 call takes_proc(foo)
15 call foo(x)
16 end subroutine
17 ! CHECK: func.func private @_QPfoo(!fir.ref<i32> {fir.optional, fir.target})