Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
1 parent
3929f91
commit 7f1adba
Showing
5 changed files
with
30 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters