diff options
author | Peter Klausler <35819229+klausler@users.noreply.github.com> | 2024-01-17 14:03:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-17 14:03:47 -0800 |
commit | 345c1ea881012d84a10b3fe6c2c420dbf8e3ef31 (patch) | |
tree | f842f67575950b5d171dde1a220aa0c21f8c1c87 /flang | |
parent | 03e43cf1c7ed0770b4afef915f82f2503a9f18fb (diff) | |
download | llvm-345c1ea881012d84a10b3fe6c2c420dbf8e3ef31.zip llvm-345c1ea881012d84a10b3fe6c2c420dbf8e3ef31.tar.gz llvm-345c1ea881012d84a10b3fe6c2c420dbf8e3ef31.tar.bz2 |
[flang] Avoid new spurious error under -fopenacc (#78504)
Don't create HostAssocDetails symbols for subprograms in OpenACC
regions; it can cause warnings to became errors later in compilation
when calls do not appear to be to external procedures with implicit
interfaces.
Diffstat (limited to 'flang')
-rw-r--r-- | flang/lib/Semantics/resolve-directives.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp index b30b81c..e31193f 100644 --- a/flang/lib/Semantics/resolve-directives.cpp +++ b/flang/lib/Semantics/resolve-directives.cpp @@ -1313,7 +1313,7 @@ void AccAttributeVisitor::Post(const parser::Name &name) { auto *symbol{name.symbol}; if (symbol && !dirContext_.empty() && GetContext().withinConstruct) { if (!symbol->owner().IsDerivedType() && !symbol->has<ProcEntityDetails>() && - !IsObjectWithDSA(*symbol)) { + !symbol->has<SubprogramDetails>() && !IsObjectWithDSA(*symbol)) { if (Symbol * found{currScope().FindSymbol(name.source)}) { if (symbol != found) { name.symbol = found; // adjust the symbol within region |