diff options
author | Jean Perier <jperier@nvidia.com> | 2022-03-25 09:00:23 +0100 |
---|---|---|
committer | Jean Perier <jperier@nvidia.com> | 2022-03-25 09:00:56 +0100 |
commit | 7f1adbaba99512d5fbf45ec54585b41218535836 (patch) | |
tree | 0abf20650edf5ab7602989d213a0520ee01539e8 /clang/lib/Lex/ModuleMap.cpp | |
parent | 3929f91397159adbb7e84e215a8c7bc6db31db97 (diff) | |
download | llvm-7f1adbaba99512d5fbf45ec54585b41218535836.zip llvm-7f1adbaba99512d5fbf45ec54585b41218535836.tar.gz llvm-7f1adbaba99512d5fbf45ec54585b41218535836.tar.bz2 |
[flang] Fix LBOUND rewrite on descriptor components
GetLowerBoundHelper rewrite in https://reviews.llvm.org/D121488 was
incorrect with POINTER/ALLOCATABLE components. The rewrite created a
descriptor inquiry to the component symbol only instead of the whole
named entity. The base information was lost, and not retrievable.
LBOUND(a(10)%p) became LBOUND(p).
Fix this regression, and also update DescriptorInquiry unparsing to
carry the kind information. DescriptorInquiries are KIND 8 expressions,
while LBOUND/SIZE/RANK, %LEN are default kind expressions.
This caused `print *,lbound(x,kind=8)` to unparse as `print*,lbound(x)` which is not
semantically the same (this unparsing issue was not an issue for
lowering, but I noticed it while writing my regression test).
Differential Revision: https://reviews.llvm.org/D122406
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions