[lld] Remove usage of `%T` in `lld/test` (#126133)
[llvm-project.git] / flang / test / Lower / HLFIR / elemental-user-procedure-stacksave.f90
blob839342f2da6d85b034928d0455c2f2ccee113dde
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
7 subroutine foo(c1, c2)
8 character(*), dimension(100) :: c1, c2
9 interface
10 elemental pure function func(c)
11 character(*), intent(in) :: c
12 character(len(c)) :: func
13 end function
14 end interface
15 c1 = func(c2)
16 end subroutine
18 ! CHECK-HLFIR-NOT: stacksave
19 ! CHECK: return
21 ! CHECK-LLVM: stacksave
22 ! CHECK-LLVM: stackrestore