[flang-commits] [flang] [flang][OpenMP] don't privatise loop index marked shared (PR #108176)
Mats Petersson via flang-commits
flang-commits at lists.llvm.org
Thu Sep 12 07:33:31 PDT 2024
================
@@ -2121,15 +2121,18 @@ void OmpAttributeVisitor::CreateImplicitSymbols(
}
return lastDeclSymbol;
};
- auto makeSharedSymbol = [&]() {
+ auto makeSharedSymbol = [&](bool setFlag) {
----------------
Leporacanthicus wrote:
Is this a bug:
```
auto makePrivateSymbol = [&](Symbol::Flag flag) {
const Symbol *hostSymbol =
lastDeclSymbol ? lastDeclSymbol : &symbol->GetUltimate();
lastDeclSymbol = DeclareNewPrivateAccessEntity(
*hostSymbol, flag, context_.FindScope(dirContext.directiveSource));
if (setFlag) {
lastDeclSymbol->set(*setFlag);
}
return lastDeclSymbol;
};
```
It has an argument `flag`, and then uses the outer scope `setFlag` to set on the created symbol? Seems like it doesn't need `flag` - or should be using `flag` instead of `setFlag`... :)
https://github.com/llvm/llvm-project/pull/108176
More information about the flang-commits
mailing list