Skip to content

Commit 7289604

Browse files
committed
[flang][Semantics] Fix updating threadprivate symbols in presence of default clause
1 parent 12c7d4c commit 7289604

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,11 @@ void OmpAttributeVisitor::Post(const parser::Name &name) {
19581958
}
19591959
}
19601960
}
1961+
1962+
if (Symbol * found{currScope().FindSymbol(name.source)}) {
1963+
if (found->test(semantics::Symbol::Flag::OmpThreadprivate))
1964+
return;
1965+
}
19611966
std::vector<Symbol *> defaultDSASymbols;
19621967
for (int dirDepth{0}; dirDepth < (int)dirContext_.size(); ++dirDepth) {
19631968
DirContext &dirContext = dirContext_[dirDepth];

0 commit comments

Comments
 (0)