[PATCH] D106831: [flang] Disallow BOZ literal constants as arguments of implicit interfaces
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 15:07:14 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f41431654fe: [flang] Disallow BOZ literal constants as arguments of implicit interfaces (authored by PeteSteinfeld).
Changed prior to commit:
https://reviews.llvm.org/D106831?vs=361807&id=361819#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106831/new/
https://reviews.llvm.org/D106831
Files:
flang/lib/Semantics/check-call.cpp
flang/test/Semantics/boz-literal-constants.f90
Index: flang/test/Semantics/boz-literal-constants.f90
===================================================================
--- flang/test/Semantics/boz-literal-constants.f90
+++ flang/test/Semantics/boz-literal-constants.f90
@@ -77,4 +77,7 @@
res = MERGE_BITS(B"1101",3,B"1011")
res = REAL(B"1101")
+
+ !ERROR: BOZ argument requires an explicit interface
+ call implictSub(Z'12345')
end subroutine
Index: flang/lib/Semantics/check-call.cpp
===================================================================
--- flang/lib/Semantics/check-call.cpp
+++ flang/lib/Semantics/check-call.cpp
@@ -46,6 +46,9 @@
}
}
if (const auto *expr{arg.UnwrapExpr()}) {
+ if (std::holds_alternative<evaluate::BOZLiteralConstant>(expr->u)) {
+ messages.Say("BOZ argument requires an explicit interface"_err_en_US);
+ }
if (auto named{evaluate::ExtractNamedEntity(*expr)}) {
const Symbol &symbol{named->GetLastSymbol()};
if (symbol.Corank() > 0) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106831.361819.patch
Type: text/x-patch
Size: 977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210726/147673fd/attachment.bin>
More information about the llvm-commits
mailing list