1! Test various aspects around call lowering. More detailed tests around core 2! requirements are done in call-xxx.f90 and dummy-argument-xxx.f90 files. 3 4! RUN: bbc -emit-fir %s -o - | FileCheck %s 5 6! CHECK-LABEL: func @_QPtest_nested_calls 7subroutine test_nested_calls() 8 interface 9 subroutine foo(i) 10 integer :: i 11 end subroutine 12 integer function bar() 13 end function 14 end interface 15 ! CHECK: %[[result_storage:.*]] = fir.alloca i32 {adapt.valuebyref} 16 ! CHECK: %[[result:.*]] = fir.call @_QPbar() : () -> i32 17 ! CHECK: fir.store %[[result]] to %[[result_storage]] : !fir.ref<i32> 18 ! CHECK: fir.call @_QPfoo(%[[result_storage]]) : (!fir.ref<i32>) -> () 19 call foo(bar()) 20end subroutine 21