[flang-commits] [PATCH] D103573: [flang] Emit error about missing interface when needed
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Jun 2 17:27:15 PDT 2021
klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
When a procedure pointer with no interface is called by a
function reference, complain about the lack.
https://reviews.llvm.org/D103573
Files:
flang/lib/Semantics/expression.cpp
flang/test/Semantics/resolve09.f90
Index: flang/test/Semantics/resolve09.f90
===================================================================
--- flang/test/Semantics/resolve09.f90
+++ flang/test/Semantics/resolve09.f90
@@ -18,6 +18,7 @@
!ERROR: Cannot call function 'f' like a subroutine
call f
!ERROR: Cannot call subroutine 's' like a function
+ !ERROR: Function result characteristics are not known
i = s()
contains
function f()
Index: flang/lib/Semantics/expression.cpp
===================================================================
--- flang/lib/Semantics/expression.cpp
+++ flang/lib/Semantics/expression.cpp
@@ -2934,6 +2934,8 @@
DEREF(result.GetTypeAndShape()).type(),
ProcedureRef{std::move(proc), std::move(arguments)});
}
+ } else {
+ Say("Function result characteristics are not known"_err_en_US);
}
}
return std::nullopt;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103573.349424.patch
Type: text/x-patch
Size: 878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210603/ef6d984d/attachment.bin>
More information about the flang-commits
mailing list