1 ! Check that stack save and restore needed for elemental function result
2 ! allocation inside loops are not emitted directly in lowering, but inserted if
3 ! needed in the stack-reclaim pass.
5 ! RUN: %flang_fc1 -emit-hlfir %s -o - | FileCheck %s --check-prefix=CHECK-HLFIR
6 ! RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-LLVM
8 character(*), dimension(100) :: c1
, c2
10 elemental pure
function func(c
)
11 character(*), intent(in
) :: c
12 character(len(c
)) :: func
18 ! CHECK-HLFIR-NOT: stacksave
21 ! CHECK-LLVM: stacksave
22 ! CHECK-LLVM: stackrestore