-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang] Whether a procedure's interface is explicit or not is not a d… #82796
Conversation
@llvm/pr-subscribers-flang-semantics Author: Peter Klausler (klausler) Changes…istinguishing characteristic We note whether a procedure's interface is explicit or implicit as an attribute of its characteristics, so that other semantics can be checked appropriately, but this internal attribute should not be used as a distinguishing characteristic in itself. Fixes #81876. Full diff: https://github.com/llvm/llvm-project/pull/82796.diff 3 Files Affected:
diff --git a/flang/lib/Evaluate/characteristics.cpp b/flang/lib/Evaluate/characteristics.cpp
index 80b0f346c32d38..cf8b16c0ead6cd 100644
--- a/flang/lib/Evaluate/characteristics.cpp
+++ b/flang/lib/Evaluate/characteristics.cpp
@@ -1265,6 +1265,7 @@ bool Procedure::IsCompatibleWith(const Procedure &actual, std::string *whyNot,
}
Attrs differences{attrs ^ actualAttrs};
differences.reset(Attr::Subroutine); // dealt with specifically later
+ differences.reset(Attr::ImplicitInterface);
if (!differences.empty()) {
if (whyNot) {
auto sep{": "s};
diff --git a/flang/test/Semantics/call35.f90 b/flang/test/Semantics/call35.f90
index ff819481226d62..81a0ecb04da536 100644
--- a/flang/test/Semantics/call35.f90
+++ b/flang/test/Semantics/call35.f90
@@ -12,7 +12,7 @@ subroutine s2
subroutine s3
interface
- !WARNING: The global subprogram 'ext' is not compatible with its local procedure declaration (incompatible procedure attributes: ImplicitInterface)
+ !WARNING: The global subprogram 'ext' is not compatible with its local procedure declaration (distinct numbers of dummy arguments)
subroutine ext(n)
integer n
end
diff --git a/flang/test/Semantics/null-init.f90 b/flang/test/Semantics/null-init.f90
index ad3f91679a4272..ad2fa511f9ff3f 100644
--- a/flang/test/Semantics/null-init.f90
+++ b/flang/test/Semantics/null-init.f90
@@ -37,7 +37,7 @@ module m6
module m7
interface
- !WARNING: The external interface 'null' is not compatible with an earlier definition (incompatible procedure attributes: ImplicitInterface)
+ !WARNING: The external interface 'null' is not compatible with an earlier definition (function results have incompatible attributes)
function null() result(p)
integer, pointer :: p
end function
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
69f1891
to
5ebbba7
Compare
…istinguishing characteristic We note whether a procedure's interface is explicit or implicit as an attribute of its characteristics, so that other semantics can be checked appropriately, but this internal attribute should not be used as a distinguishing characteristic in itself. Fixes llvm#81876.
…istinguishing characteristic
We note whether a procedure's interface is explicit or implicit as an attribute of its characteristics, so that other semantics can be checked appropriately, but this internal attribute should not be used as a distinguishing characteristic in itself.
Fixes #81876.