Skip to content

Commit 345c1ea

Browse files
authored
[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.
1 parent 03e43cf commit 345c1ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ void AccAttributeVisitor::Post(const parser::Name &name) {
13131313
auto *symbol{name.symbol};
13141314
if (symbol && !dirContext_.empty() && GetContext().withinConstruct) {
13151315
if (!symbol->owner().IsDerivedType() && !symbol->has<ProcEntityDetails>() &&
1316-
!IsObjectWithDSA(*symbol)) {
1316+
!symbol->has<SubprogramDetails>() && !IsObjectWithDSA(*symbol)) {
13171317
if (Symbol * found{currScope().FindSymbol(name.source)}) {
13181318
if (symbol != found) {
13191319
name.symbol = found; // adjust the symbol within region

0 commit comments

Comments
 (0)