[flang][hlfir] Inherit constant length for the result of hlfir.transpose.
authorSlava Zakharin <szakharin@nvidia.com>
Mon, 24 Jul 2023 16:22:13 +0000 (09:22 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Mon, 24 Jul 2023 17:12:39 +0000 (10:12 -0700)
commit3eedff3c0466300fc4345768cd622aa6d4eebfd9
tree307fb5da53de59e7fa2e19e1449be6e94104dd17
parent841ff7c6ca4c6fa9ff3ac6ba93e177462b7d668e
[flang][hlfir] Inherit constant length for the result of hlfir.transpose.

Character length may be unknown for the type of Fortran::evaluate::FunctionRef
expression, but we can try to propagate it from the argument of
TRANSPOSE if it is known constant. Alternatively, we could relax
hlfir.transpose verification (i.e. allow character types mismatch
for the argument and the result).

Depends on D155912

Reviewed By: tblah

Differential Revision: https://reviews.llvm.org/D155913
flang/lib/Lower/HlfirIntrinsics.cpp
flang/test/Lower/HLFIR/transpose.f90