[flang] Fix forall issue with substring operation
authorValentin Clement <clementval@gmail.com>
Fri, 24 Jun 2022 07:07:03 +0000 (09:07 +0200)
committerValentin Clement <clementval@gmail.com>
Fri, 24 Jun 2022 07:07:49 +0000 (09:07 +0200)
commit753b766deaa2d9baab2e7dad7ce02ae2e08a0a24
tree0f89e42b4f4b1005edf5f30bb8ce3c624ca32d40
parent124d9fc9585300c0c20388dead9fcaac7043709a
[flang] Fix forall issue with substring operation

When there is a substring operation on a scalar assignment in a FORALL
context, we have to lower the entire substring and not the entire
CHARACTER variable.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld, klausler

Differential Revision: https://reviews.llvm.org/D128459

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/forall/scalar-substring.f90 [new file with mode: 0644]