aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Evaluate/intrinsics.cpp
diff options
context:
space:
mode:
authorPeter Klausler <35819229+klausler@users.noreply.github.com>2023-11-13 13:31:58 -0800
committerGitHub <noreply@github.com>2023-11-13 13:31:58 -0800
commit29fd3e2aa8ea09264037c278648c9033250843e0 (patch)
tree79f4ee577c340c60671dcac4443302918c8376f9 /flang/lib/Evaluate/intrinsics.cpp
parentc9626e6264c4dd7c7e171c1f525a9f746b09bf16 (diff)
downloadllvm-29fd3e2aa8ea09264037c278648c9033250843e0.zip
llvm-29fd3e2aa8ea09264037c278648c9033250843e0.tar.gz
llvm-29fd3e2aa8ea09264037c278648c9033250843e0.tar.bz2
[flang] Allow polymorphic actual to implicit interface (#70873)
Semantics is emitting an error when an actual argument to a procedure that has an implicit interface has a polymorphic type. This is too general; while TYPE(*) and CLASS(*) unlimited polymorphic items require the presence of an explicit procedure interface, CLASS(T) data can be passed over an implicit interface to a procedure expecting a corresponding dummy argument with TYPE(T), so long as T is not parameterized. (Only XLF handles this usage correctly among other Fortran compilers.) (Making this work in the case of an actual CLASS(T) array may well require additional changes in lowering to copy data to/from a temporary buffer to ensure contiguity when the actual type of the array is an extension of T.)
Diffstat (limited to 'flang/lib/Evaluate/intrinsics.cpp')
-rw-r--r--flang/lib/Evaluate/intrinsics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/flang/lib/Evaluate/intrinsics.cpp b/flang/lib/Evaluate/intrinsics.cpp
index 9e78a1b..9eb01df 100644
--- a/flang/lib/Evaluate/intrinsics.cpp
+++ b/flang/lib/Evaluate/intrinsics.cpp
@@ -2325,8 +2325,8 @@ std::optional<SpecificCall> IntrinsicInterface::Match(
}
}
}
- if (auto dc{characteristics::DummyArgument::FromActual(
- std::move(kw), *expr, context)}) {
+ if (auto dc{characteristics::DummyArgument::FromActual(std::move(kw),
+ *expr, context, /*forImplicitInterface=*/false)}) {
dummyArgs.emplace_back(std::move(*dc));
if (d.typePattern.kindCode == KindCode::same && !sameDummyArg) {
sameDummyArg = j;