mirror of
https://github.com/intel/llvm.git
synced 2026-01-29 04:16:38 +08:00
[flang] Don't check procedure pointer interface function result specification expressions
When a procedure pointer references a function as its interface, don't apply semantic checks to the specification expressions that appear in the declaration of the function's result -- this can lead to bogus error messages as those specification expressions are being examined out of their proper context. Differential Revision: https://reviews.llvm.org/D131106
This commit is contained in:
@@ -291,7 +291,11 @@ void CheckHelper::Check(const Symbol &symbol) {
|
||||
canHaveAssumedParameter |= symbol.has<AssocEntityDetails>();
|
||||
}
|
||||
}
|
||||
Check(*type, canHaveAssumedParameter);
|
||||
if (IsProcedurePointer(symbol) && symbol.HasExplicitInterface()) {
|
||||
// Don't check function result types here
|
||||
} else {
|
||||
Check(*type, canHaveAssumedParameter);
|
||||
}
|
||||
if (InPure() && InFunction() && IsFunctionResult(symbol)) {
|
||||
if (derived && HasImpureFinal(*derived)) { // C1584
|
||||
messages_.Say(
|
||||
|
||||
Reference in New Issue
Block a user