[flang] Correct folding of TRANSFER(integer, character array)
authorPeter Klausler <pklausler@nvidia.com>
Fri, 15 Jul 2022 19:15:07 +0000 (12:15 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 23 Jul 2022 00:28:08 +0000 (17:28 -0700)
commit60b1fcb1a550b7a7ed0324f122efcd8da1c77eb2
tree297902b82ab2d4249b0a430b52d28060c099db9a
parent80a4e6fd31a06143b83947785ea3bd5c04344ea6
[flang] Correct folding of TRANSFER(integer, character array)

The code that copies data from a constant source array into a character
array constant result was failing to copy its last element if it was
only partially defined due to misalignment.

Differential Revision: https://reviews.llvm.org/D130376
flang/lib/Evaluate/initial-image.cpp
flang/test/Evaluate/fold-transfer.f90