[flang-commits] [PATCH] D127021: [flang] Don't discard lower bounds of implicit-shape named constants
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Jun 3 22:49:15 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG08c6a323813d: [flang] Don't discard lower bounds of implicit-shape named constants (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127021/new/
https://reviews.llvm.org/D127021
Files:
flang/lib/Evaluate/check-expression.cpp
Index: flang/lib/Evaluate/check-expression.cpp
===================================================================
--- flang/lib/Evaluate/check-expression.cpp
+++ flang/lib/Evaluate/check-expression.cpp
@@ -418,7 +418,10 @@
int symRank{GetRank(symTS->shape())};
if (IsImpliedShape(symbol)) {
if (folded.Rank() == symRank) {
- return {std::move(folded)};
+ return ArrayConstantBoundChanger{
+ std::move(*AsConstantExtents(
+ context, GetRawLowerBounds(context, NamedEntity{symbol})))}
+ .ChangeLbounds(std::move(folded));
} else {
context.messages().Say(
"Implied-shape parameter '%s' has rank %d but its initializer has rank %d"_err_en_US,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127021.434244.patch
Type: text/x-patch
Size: 781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220604/577bfa74/attachment.bin>
More information about the flang-commits
mailing list