Skip to content

Commit

Permalink
[flang] Avoid new spurious error under -fopenacc (#78504)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
klausler committed Jan 17, 2024
1 parent 03e43cf commit 345c1ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Semantics/resolve-directives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 345c1ea

Please sign in to comment.