[flang][hlfir] Create temporary for passing constant expression for actual arg.
Even though the constant expression actual argument is not definable,
and the associated dummy argument is not definable, the compiler may produce
implicit copies into the memory storage associated with the constant expression.
For example, a constant expression storage passed by reference to a subprogram
may be used for implicit copy-out:
subroutine sub(i, n) interface subroutine sub2(i) integer :: i(*) end subroutine sub2 end interface integer :: i(n) call sub2(i(3::2)) ! copy-out after the call will write to 'i' end subroutine sub subroutine test call sub((/1,2,3,4,5/), 5) end subroutine test
If we pass a reference to constant expression storage to 'sub' directly,
the copy-out inside 'sub' will try to write into readonly memory.