bolt/deps/llvm-18.1.8/flang/test/HLFIR/inline-elemental.f90

16 lines
511 B
Fortran
Raw Normal View History

2025-02-14 19:21:04 +01:00
! RUN: %flang_fc1 -emit-obj -flang-experimental-hlfir -o /dev/null %s
! Regression test: ensure we can compile this without crashing
! this results in a hlfir.elemental with mismatched types in the hlfir.apply
! and hlfir.yield
subroutine test
interface
function func(i,j,k)
character(5),allocatable :: func(:,:,:)
end function func
end interface
character(13),allocatable :: a(:,:,:)
print *, (func(2,5,3)//reshape([(char(ichar('a')+n),n=1,2*5*3)], &
& [2,5,3]))
end subroutine test